Class: LSP::SignatureHelpContext
- Defined in:
- lib/lsp/lsp_protocol.rb
Overview
export interface SignatureHelpContext
/**
* Action that caused signature help to be triggered.
*/
triggerKind: SignatureHelpTriggerKind;
/**
* Character that caused signature help to be triggered.
*
* This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`
*/
triggerCharacter?: string;
/**
* `true` if signature help was already showing when it was triggered.
*
* Retriggers occur when the signature help is already active and can be caused by actions such as
* typing a trigger character, a cursor move, or document content changes.
*/
isRetrigger: boolean;
/**
* The currently active `SignatureHelp`.
*
* The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on
* the user navigating through available signatures.
*/
activeSignatureHelp?: SignatureHelp;
Instance Attribute Summary collapse
-
#activeSignatureHelp ⇒ Object
type: SignatureHelpTriggerKind # type: string # type: boolean # type: SignatureHelp.
-
#isRetrigger ⇒ Object
type: SignatureHelpTriggerKind # type: string # type: boolean # type: SignatureHelp.
-
#triggerCharacter ⇒ Object
type: SignatureHelpTriggerKind # type: string # type: boolean # type: SignatureHelp.
-
#triggerKind ⇒ Object
type: SignatureHelpTriggerKind # type: string # type: boolean # type: SignatureHelp.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ SignatureHelpContext
constructor
A new instance of SignatureHelpContext.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ SignatureHelpContext
Returns a new instance of SignatureHelpContext.
1360 1361 1362 1363 |
# File 'lib/lsp/lsp_protocol.rb', line 1360 def initialize(initial_hash = nil) super @optional_method_names = %i[triggerCharacter activeSignatureHelp] end |
Instance Attribute Details
#activeSignatureHelp ⇒ Object
type: SignatureHelpTriggerKind # type: string # type: boolean # type: SignatureHelp
1358 1359 1360 |
# File 'lib/lsp/lsp_protocol.rb', line 1358 def activeSignatureHelp @activeSignatureHelp end |
#isRetrigger ⇒ Object
type: SignatureHelpTriggerKind # type: string # type: boolean # type: SignatureHelp
1358 1359 1360 |
# File 'lib/lsp/lsp_protocol.rb', line 1358 def isRetrigger @isRetrigger end |
#triggerCharacter ⇒ Object
type: SignatureHelpTriggerKind # type: string # type: boolean # type: SignatureHelp
1358 1359 1360 |
# File 'lib/lsp/lsp_protocol.rb', line 1358 def triggerCharacter @triggerCharacter end |
#triggerKind ⇒ Object
type: SignatureHelpTriggerKind # type: string # type: boolean # type: SignatureHelp
1358 1359 1360 |
# File 'lib/lsp/lsp_protocol.rb', line 1358 def triggerKind @triggerKind end |
Instance Method Details
#from_h!(value) ⇒ Object
1365 1366 1367 1368 1369 1370 1371 1372 |
# File 'lib/lsp/lsp_protocol.rb', line 1365 def from_h!(value) value = {} if value.nil? self.triggerKind = value['triggerKind'] # Unknown type self.triggerCharacter = value['triggerCharacter'] self.isRetrigger = value['isRetrigger'] # Unknown type self.activeSignatureHelp = value['activeSignatureHelp'] # Unknown type self end |