Class: LanguageServer::Protocol::Interface::SignatureHelpParams

Inherits:
Object
  • Object
show all
Defined in:
lib/language_server/protocol/interface/signature_help_params.rb

Overview

Parameters for a [SignatureHelpRequest](#SignatureHelpRequest).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context: nil, text_document:, position:, work_done_token: nil) ⇒ SignatureHelpParams

Returns a new instance of SignatureHelpParams.



8
9
10
11
12
13
14
15
16
17
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 8

def initialize(context: nil, text_document:, position:, work_done_token: nil)
  @attributes = {}

  @attributes[:context] = context if context
  @attributes[:textDocument] = text_document
  @attributes[:position] = position
  @attributes[:workDoneToken] = work_done_token if work_done_token

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



54
55
56
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 54

def attributes
  @attributes
end

Instance Method Details

#contextSignatureHelpContext | nil

The signature help context. This is only available if the client specifies to send this using the client capability ‘textDocument.signatureHelp.contextSupport === true`

Returns:

Since:

  • 3.15.0



26
27
28
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 26

def context
  attributes.fetch(:context)
end

#positionPosition

The position inside the text document.

Returns:



42
43
44
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 42

def position
  attributes.fetch(:position)
end

#text_documentTextDocumentIdentifier

The text document.



34
35
36
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 34

def text_document
  attributes.fetch(:textDocument)
end

#to_hashObject



56
57
58
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 56

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



60
61
62
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 60

def to_json(*args)
  to_hash.to_json(*args)
end

#work_done_tokenProgressToken | nil

An optional token that a server can use to report work done progress.

Returns:

  • (ProgressToken | nil)


50
51
52
# File 'lib/language_server/protocol/interface/signature_help_params.rb', line 50

def work_done_token
  attributes.fetch(:workDoneToken)
end