Class: LSP::SemanticTokensLegend

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

Overview

export interface SemanticTokensLegend

/**
 * The token types a server uses.
 */
tokenTypes: string[];
/**
 * The token modifiers a server uses.
 */
tokenModifiers: string[];

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#initialize, #to_h, #to_json

Constructor Details

This class inherits a constructor from LSP::LSPBase

Instance Attribute Details

#tokenModifiersObject

type: string[] # type: string[]



20
21
22
# File 'lib/lsp/lsp_protocol_sematictokens.proposed.rb', line 20

def tokenModifiers
  @tokenModifiers
end

#tokenTypesObject

type: string[] # type: string[]



20
21
22
# File 'lib/lsp/lsp_protocol_sematictokens.proposed.rb', line 20

def tokenTypes
  @tokenTypes
end

Instance Method Details

#from_h!(value) ⇒ Object



22
23
24
25
26
27
# File 'lib/lsp/lsp_protocol_sematictokens.proposed.rb', line 22

def from_h!(value)
  value = {} if value.nil?
  self.tokenTypes = value['tokenTypes'].map { |val| val } unless value['tokenTypes'].nil?
  self.tokenModifiers = value['tokenModifiers'].map { |val| val } unless value['tokenModifiers'].nil?
  self
end