Class: LSP::CompletionParams
Overview
export interface CompletionParams extends TextDocumentPositionParams, WorkDoneProgressParams, PartialResultParams
/**
* The completion context. This is only available it the client specifies
* to send this using the client capability `textDocument.completion.contextSupport === true`
*/
context?: CompletionContext;
Instance Attribute Summary collapse
-
#context ⇒ Object
type: CompletionContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken.
-
#partialResultToken ⇒ Object
type: CompletionContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken.
-
#position ⇒ Object
type: CompletionContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken.
-
#textDocument ⇒ Object
type: CompletionContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken.
-
#workDoneToken ⇒ Object
type: CompletionContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ CompletionParams
constructor
A new instance of CompletionParams.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ CompletionParams
Returns a new instance of CompletionParams.
1060 1061 1062 1063 |
# File 'lib/lsp/lsp_protocol.rb', line 1060 def initialize(initial_hash = nil) super @optional_method_names = %i[context workDoneToken partialResultToken] end |
Instance Attribute Details
#context ⇒ Object
type: CompletionContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken
1058 1059 1060 |
# File 'lib/lsp/lsp_protocol.rb', line 1058 def context @context end |
#partialResultToken ⇒ Object
type: CompletionContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken
1058 1059 1060 |
# File 'lib/lsp/lsp_protocol.rb', line 1058 def partialResultToken @partialResultToken end |
#position ⇒ Object
type: CompletionContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken
1058 1059 1060 |
# File 'lib/lsp/lsp_protocol.rb', line 1058 def position @position end |
#textDocument ⇒ Object
type: CompletionContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken
1058 1059 1060 |
# File 'lib/lsp/lsp_protocol.rb', line 1058 def textDocument @textDocument end |
#workDoneToken ⇒ Object
type: CompletionContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken # type: ProgressToken
1058 1059 1060 |
# File 'lib/lsp/lsp_protocol.rb', line 1058 def workDoneToken @workDoneToken end |
Instance Method Details
#from_h!(value) ⇒ Object
1065 1066 1067 1068 1069 1070 1071 1072 1073 |
# File 'lib/lsp/lsp_protocol.rb', line 1065 def from_h!(value) value = {} if value.nil? self.context = CompletionContext.new(value['context']) unless value['context'].nil? self.textDocument = value['textDocument'] # Unknown type self.position = value['position'] # Unknown type self.workDoneToken = value['workDoneToken'] # Unknown type self.partialResultToken = value['partialResultToken'] # Unknown type self end |