Sha256: 24d53fe924830924c5f7acdc04a5b7d1599299dbe10861626cb5c2676b7e666a
Contents?: true
Size: 1018 Bytes
Versions: 109
Compression:
Stored size: 1018 Bytes
Contents
module LanguageServer module Protocol module Interface class SemanticTokens def initialize(result_id: nil, data:) @attributes = {} @attributes[:resultId] = result_id if result_id @attributes[:data] = data @attributes.freeze end # # 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] def result_id attributes.fetch(:resultId) end # # The actual tokens. # # @return [number[]] def data attributes.fetch(:data) end attr_reader :attributes def to_hash attributes end def to_json(*args) to_hash.to_json(*args) end end end end end
Version data entries
109 entries across 109 versions & 14 rubygems