Class: LSP::HoverClientCapabilities

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

Overview

export interface HoverClientCapabilities

/**
 * Whether hover supports dynamic registration.
 */
dynamicRegistration?: boolean;
/**
 * Client supports the follow content formats for the content
 * property. The order describes the preferred format of the client.
 */
contentFormat?: MarkupKind[];

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ HoverClientCapabilities

Returns a new instance of HoverClientCapabilities.



1158
1159
1160
1161
# File 'lib/lsp/lsp_protocol.rb', line 1158

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

Instance Attribute Details

#contentFormatObject

type: boolean # type: MarkupKind[]



1156
1157
1158
# File 'lib/lsp/lsp_protocol.rb', line 1156

def contentFormat
  @contentFormat
end

#dynamicRegistrationObject

type: boolean # type: MarkupKind[]



1156
1157
1158
# File 'lib/lsp/lsp_protocol.rb', line 1156

def dynamicRegistration
  @dynamicRegistration
end

Instance Method Details

#from_h!(value) ⇒ Object



1163
1164
1165
1166
1167
1168
# File 'lib/lsp/lsp_protocol.rb', line 1163

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