Class: LanguageServer::Protocol::Interface::SemanticTokensOptions
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::SemanticTokensOptions
- Defined in:
- lib/language_server/protocol/interface/semantic_tokens_options.rb
Overview
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
Instance Method Summary collapse
-
#full ⇒ boolean | { delta:boolean } | nil
Server supports providing semantic tokens for a full document.
-
#initialize(legend:, range: nil, full: nil, work_done_progress: nil) ⇒ SemanticTokensOptions
constructor
A new instance of SemanticTokensOptions.
-
#legend ⇒ SemanticTokensLegend
The legend used by the server.
-
#range ⇒ boolean | { } | nil
Server supports providing semantic tokens for a specific range of a document.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
- #work_done_progress ⇒ boolean | nil
Constructor Details
#initialize(legend:, range: nil, full: nil, work_done_progress: nil) ⇒ SemanticTokensOptions
Returns a new instance of SemanticTokensOptions.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 8 def initialize(legend:, range: nil, full: nil, work_done_progress: nil) @attributes = {} @attributes[:legend] = legend @attributes[:range] = range if range @attributes[:full] = full if full @attributes[:workDoneProgress] = work_done_progress if work_done_progress @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
49 50 51 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 49 def attributes @attributes end |
Instance Method Details
#full ⇒ boolean | { delta:boolean } | nil
Server supports providing semantic tokens for a full document.
40 41 42 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 40 def full attributes.fetch(:full) end |
#legend ⇒ SemanticTokensLegend
The legend used by the server
23 24 25 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 23 def legend attributes.fetch(:legend) end |
#range ⇒ boolean | { } | nil
Server supports providing semantic tokens for a specific range of a document.
32 33 34 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 32 def range attributes.fetch(:range) end |
#to_hash ⇒ Object
51 52 53 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 51 def to_hash attributes end |
#to_json(*args) ⇒ Object
55 56 57 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 55 def to_json(*args) to_hash.to_json(*args) end |
#work_done_progress ⇒ boolean | nil
45 46 47 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 45 def work_done_progress attributes.fetch(:workDoneProgress) end |