Class: LSP::SignatureHelpOptions

Inherits:
LSPBase
  • Object
show all
Defined in:
lib/lsp/lsp_protocol.rb

Overview

export interface SignatureHelpOptions extends WorkDoneProgressOptions

/**
 * List of characters that trigger signature help.
 */
triggerCharacters?: string[];
/**
 * List of characters that re-trigger signature help.
 *
 * These trigger characters are only active when signature help is already showing. All trigger characters
 * are also counted as re-trigger characters.
 *
 * @since 3.15.0
 */
retriggerCharacters?: string[];

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ SignatureHelpOptions

Returns a new instance of SignatureHelpOptions.



1317
1318
1319
1320
# File 'lib/lsp/lsp_protocol.rb', line 1317

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[triggerCharacters retriggerCharacters workDoneProgress]
end

Instance Attribute Details

#retriggerCharactersObject

type: string[] # type: string[] # type: boolean



1315
1316
1317
# File 'lib/lsp/lsp_protocol.rb', line 1315

def retriggerCharacters
  @retriggerCharacters
end

#triggerCharactersObject

type: string[] # type: string[] # type: boolean



1315
1316
1317
# File 'lib/lsp/lsp_protocol.rb', line 1315

def triggerCharacters
  @triggerCharacters
end

#workDoneProgressObject

type: string[] # type: string[] # type: boolean



1315
1316
1317
# File 'lib/lsp/lsp_protocol.rb', line 1315

def workDoneProgress
  @workDoneProgress
end

Instance Method Details

#from_h!(value) ⇒ Object



1322
1323
1324
1325
1326
1327
1328
# File 'lib/lsp/lsp_protocol.rb', line 1322

def from_h!(value)
  value = {} if value.nil?
  self.triggerCharacters = value['triggerCharacters'].map { |val| val } unless value['triggerCharacters'].nil?
  self.retriggerCharacters = value['retriggerCharacters'].map { |val| val } unless value['retriggerCharacters'].nil?
  self.workDoneProgress = value['workDoneProgress'] # Unknown type
  self
end