Class: LSP::SignatureHelpContext

Inherits:
LSPBase
  • Object
show all
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

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

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

#activeSignatureHelpObject

type: SignatureHelpTriggerKind # type: string # type: boolean # type: SignatureHelp



1358
1359
1360
# File 'lib/lsp/lsp_protocol.rb', line 1358

def activeSignatureHelp
  @activeSignatureHelp
end

#isRetriggerObject

type: SignatureHelpTriggerKind # type: string # type: boolean # type: SignatureHelp



1358
1359
1360
# File 'lib/lsp/lsp_protocol.rb', line 1358

def isRetrigger
  @isRetrigger
end

#triggerCharacterObject

type: SignatureHelpTriggerKind # type: string # type: boolean # type: SignatureHelp



1358
1359
1360
# File 'lib/lsp/lsp_protocol.rb', line 1358

def triggerCharacter
  @triggerCharacter
end

#triggerKindObject

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