Class: LSP::TypeDefinitionClientCapabilities

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

Overview

export interface TypeDefinitionClientCapabilities

/**
 * Whether implementation supports dynamic registration. If this is set to `true`
 * the client supports the new `TypeDefinitionRegistrationOptions` return value
 * for the corresponding server capability as well.
 */
dynamicRegistration?: boolean;
/**
 * The client supports additional metadata in the form of definition links.
 *
 * Since 3.14.0
 */
linkSupport?: boolean;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ TypeDefinitionClientCapabilities

Returns a new instance of TypeDefinitionClientCapabilities.



28
29
30
31
# File 'lib/lsp/lsp_protocol_typedefinition.rb', line 28

def initialize(initial_hash = nil)
  super
  @optional_method_names = %i[dynamicRegistration linkSupport]
end

Instance Attribute Details

#dynamicRegistrationObject

type: boolean # type: boolean



26
27
28
# File 'lib/lsp/lsp_protocol_typedefinition.rb', line 26

def dynamicRegistration
  @dynamicRegistration
end

#linkSupportObject

type: boolean # type: boolean



26
27
28
# File 'lib/lsp/lsp_protocol_typedefinition.rb', line 26

def linkSupport
  @linkSupport
end

Instance Method Details

#from_h!(value) ⇒ Object



33
34
35
36
37
38
# File 'lib/lsp/lsp_protocol_typedefinition.rb', line 33

def from_h!(value)
  value = {} if value.nil?
  self.dynamicRegistration = value['dynamicRegistration'] # Unknown type
  self.linkSupport = value['linkSupport'] # Unknown type
  self
end