struct LSP::Message::Completion

Overview

The Completion request is sent from the client to the server to compute completion items at a given cursor position. Completion items are presented in the IntelliSense user interface. If computing full completion items is expensive, servers can additionally provide a handler for the completion item resolve request (‘completionItem/resolve’). This request is sent when a completion item is selected in the user interface. A typical use case is for example: the ‘textDocument/completion’ request doesn’t fill in the documentation property for returned completion items since it is expensive to compute. When the item is selected in the user interface then a ‘completionItem/resolve’ request is sent with the selected completion item as a param. The returned completion item should have the documentation property filled in. The request can delay the computation of the detail and documentation properties. However, properties that are needed for the initial sorting and filtering, like sortText, filterText, insertText, and textEdit must be provided in the textDocument/completion request and must not be changed during resolve.

Included Modules

Defined in:

lsp/message.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

def self.new(id : Int64 | String, params : LSP::Message::Completion::Params = Params.new) #

[View source]

Class Method Detail

def self.empty_result #

[View source]
def self.method #

[View source]

Instance Method Detail

def error_response_from_json(input) #

[View source]
def id : Int64 | String #

def id=(id : Int64 | String) #

def jsonrpc : String #

def jsonrpc=(jsonrpc : String) #

def method : String #

def method=(method : String) #

def new_error_response #

[View source]
def new_response #

[View source]
def params : Params #

def params=(params : Params) #

def response_from_json(input) #

[View source]