Class: LanguageServer::Protocol::Interface::SignatureHelpClientCapabilities

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dynamic_registration: nil, signature_information: nil, context_support: nil) ⇒ SignatureHelpClientCapabilities

Returns a new instance of SignatureHelpClientCapabilities.



5
6
7
8
9
10
11
12
13
# File 'lib/language_server/protocol/interface/signature_help_client_capabilities.rb', line 5

def initialize(dynamic_registration: nil, signature_information: nil, context_support: nil)
  @attributes = {}

  @attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration
  @attributes[:signatureInformation] = signature_information if signature_information
  @attributes[:contextSupport] = context_support if context_support

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



43
44
45
# File 'lib/language_server/protocol/interface/signature_help_client_capabilities.rb', line 43

def attributes
  @attributes
end

Instance Method Details

#context_supportboolean

The client supports to send additional context information for a ‘textDocument/signatureHelp` request. A client that opts into contextSupport will also support the `retriggerCharacters` on `SignatureHelpOptions`.

Returns:

  • (boolean)


39
40
41
# File 'lib/language_server/protocol/interface/signature_help_client_capabilities.rb', line 39

def context_support
  attributes.fetch(:contextSupport)
end

#dynamic_registrationboolean

Whether signature help supports dynamic registration.

Returns:

  • (boolean)


19
20
21
# File 'lib/language_server/protocol/interface/signature_help_client_capabilities.rb', line 19

def dynamic_registration
  attributes.fetch(:dynamicRegistration)
end

#signature_information{ documentationFormat?: MarkupKind[]; parameterInformation?: { labelOffsetSupport?: boolean; }; activeParameterSupport?: boolean; }

The client supports the following ‘SignatureInformation` specific properties.

Returns:

  • ({ documentationFormat?: MarkupKind[]; parameterInformation?: { labelOffsetSupport?: boolean; }; activeParameterSupport?: boolean; })


28
29
30
# File 'lib/language_server/protocol/interface/signature_help_client_capabilities.rb', line 28

def signature_information
  attributes.fetch(:signatureInformation)
end

#to_hashObject



45
46
47
# File 'lib/language_server/protocol/interface/signature_help_client_capabilities.rb', line 45

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



49
50
51
# File 'lib/language_server/protocol/interface/signature_help_client_capabilities.rb', line 49

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