Class: LSP::SemanticTokensEdits

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

Overview

export interface SemanticTokensEdits

readonly resultId?: string;
/**
 * For a detailed description how these edits are structured pls see
 * https://github.com/microsoft/vscode-extension-samples/blob/5ae1f7787122812dcc84e37427ca90af5ee09f14/semantic-tokens-sample/vscode.proposed.d.ts#L131
 */
edits: SemanticTokensEdit[];

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ SemanticTokensEdits

Returns a new instance of SemanticTokensEdits.



107
108
109
110
# File 'lib/lsp/lsp_protocol_sematictokens.proposed.rb', line 107

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

Instance Attribute Details

#editsObject

type: string # type: SemanticTokensEdit[]



105
106
107
# File 'lib/lsp/lsp_protocol_sematictokens.proposed.rb', line 105

def edits
  @edits
end

#resultIdObject

type: string # type: SemanticTokensEdit[]



105
106
107
# File 'lib/lsp/lsp_protocol_sematictokens.proposed.rb', line 105

def resultId
  @resultId
end

Instance Method Details

#from_h!(value) ⇒ Object



112
113
114
115
116
117
# File 'lib/lsp/lsp_protocol_sematictokens.proposed.rb', line 112

def from_h!(value)
  value = {} if value.nil?
  self.resultId = value['resultId']
  self.edits = to_typed_aray(value['edits'], SemanticTokensEdit)
  self
end