class LanguageServer::Protocol::Interface::SemanticTokens
Attributes
attributes[R]
Public Class Methods
new(result_id: nil, data:)
click to toggle source
# File lib/language_server/protocol/interface/semantic_tokens.rb, line 5 def initialize(result_id: nil, data:) @attributes = {} @attributes[:resultId] = result_id if result_id @attributes[:data] = data @attributes.freeze end
Public Instance Methods
data()
click to toggle source
The actual tokens.
@return [number
# File lib/language_server/protocol/interface/semantic_tokens.rb, line 29 def data attributes.fetch(:data) end
result_id()
click to toggle source
An optional result id. If provided and clients support delta updating the client will include the result id in the next semantic token request. A server can then instead of computing all semantic tokens again simply send a delta.
@return [string]
# File lib/language_server/protocol/interface/semantic_tokens.rb, line 21 def result_id attributes.fetch(:resultId) end
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/semantic_tokens.rb, line 35 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/semantic_tokens.rb, line 39 def to_json(*args) to_hash.to_json(*args) end