Class: LSP::SignatureHelpParams

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

Overview

export interface SignatureHelpParams extends TextDocumentPositionParams, WorkDoneProgressParams

/**
 * The signature help context. This is only available if the client specifies
 * to send this using the client capability `textDocument.signatureHelp.contextSupport === true`
 *
 * @since 3.15.0
 */
context?: SignatureHelpContext;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ SignatureHelpParams

Returns a new instance of SignatureHelpParams.



1387
1388
1389
1390
# File 'lib/lsp/lsp_protocol.rb', line 1387

def initialize(initial_hash = nil)
  super
  @optional_method_names = i[context workDoneToken]
end

Instance Attribute Details

#contextObject

type: SignatureHelpContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken



1385
1386
1387
# File 'lib/lsp/lsp_protocol.rb', line 1385

def context
  @context
end

#positionObject

type: SignatureHelpContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken



1385
1386
1387
# File 'lib/lsp/lsp_protocol.rb', line 1385

def position
  @position
end

#textDocumentObject

type: SignatureHelpContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken



1385
1386
1387
# File 'lib/lsp/lsp_protocol.rb', line 1385

def textDocument
  @textDocument
end

#workDoneTokenObject

type: SignatureHelpContext # type: TextDocumentIdentifier # type: Position # type: ProgressToken



1385
1386
1387
# File 'lib/lsp/lsp_protocol.rb', line 1385

def workDoneToken
  @workDoneToken
end

Instance Method Details

#from_h!(value) ⇒ Object



1392
1393
1394
1395
1396
1397
1398
1399
# File 'lib/lsp/lsp_protocol.rb', line 1392

def from_h!(value)
  value = {} if value.nil?
  self.context = SignatureHelpContext.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
end