Class: LSP::CompletionContext
- Defined in:
- lib/lsp/lsp_protocol.rb
Overview
export interface CompletionContext
/**
* How the completion was triggered.
*/
triggerKind: CompletionTriggerKind;
/**
* The trigger character (a single character) that has trigger code complete.
* Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`
*/
triggerCharacter?: string;
Instance Attribute Summary collapse
-
#triggerCharacter ⇒ Object
type: CompletionTriggerKind # type: string.
-
#triggerKind ⇒ Object
type: CompletionTriggerKind # type: string.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ CompletionContext
constructor
A new instance of CompletionContext.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ CompletionContext
Returns a new instance of CompletionContext.
1037 1038 1039 1040 |
# File 'lib/lsp/lsp_protocol.rb', line 1037 def initialize(initial_hash = nil) super @optional_method_names = %i[triggerCharacter] end |
Instance Attribute Details
#triggerCharacter ⇒ Object
type: CompletionTriggerKind # type: string
1035 1036 1037 |
# File 'lib/lsp/lsp_protocol.rb', line 1035 def triggerCharacter @triggerCharacter end |
#triggerKind ⇒ Object
type: CompletionTriggerKind # type: string
1035 1036 1037 |
# File 'lib/lsp/lsp_protocol.rb', line 1035 def triggerKind @triggerKind end |
Instance Method Details
#from_h!(value) ⇒ Object
1042 1043 1044 1045 1046 1047 |
# File 'lib/lsp/lsp_protocol.rb', line 1042 def from_h!(value) value = {} if value.nil? self.triggerKind = value['triggerKind'] # Unknown type self.triggerCharacter = value['triggerCharacter'] self end |