Class: LanguageServer::Protocol::Interface::SemanticTokensOptions
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::SemanticTokensOptions
- Defined in:
- lib/language_server/protocol/interface/semantic_tokens_options.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#full ⇒ boolean | { delta?: boolean; }
Server supports providing semantic tokens for a full document.
-
#initialize(work_done_progress: nil, legend:, range: nil, full: nil) ⇒ SemanticTokensOptions
constructor
A new instance of SemanticTokensOptions.
-
#legend ⇒ SemanticTokensLegend
The legend used by the server.
-
#range ⇒ boolean | {}
Server supports providing semantic tokens for a specific range of a document.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
- #work_done_progress ⇒ boolean
Constructor Details
#initialize(work_done_progress: nil, legend:, range: nil, full: nil) ⇒ SemanticTokensOptions
Returns a new instance of SemanticTokensOptions.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 5 def initialize(work_done_progress: nil, legend:, range: nil, full: nil) @attributes = {} @attributes[:workDoneProgress] = work_done_progress if work_done_progress @attributes[:legend] = legend @attributes[:range] = range if range @attributes[:full] = full if full @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
46 47 48 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 46 def attributes @attributes end |
Instance Method Details
#full ⇒ boolean | { delta?: boolean; }
Server supports providing semantic tokens for a full document.
42 43 44 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 42 def full attributes.fetch(:full) end |
#legend ⇒ SemanticTokensLegend
The legend used by the server
25 26 27 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 25 def legend attributes.fetch(:legend) end |
#range ⇒ boolean | {}
Server supports providing semantic tokens for a specific range of a document.
34 35 36 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 34 def range attributes.fetch(:range) end |
#to_hash ⇒ Object
48 49 50 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 48 def to_hash attributes end |
#to_json(*args) ⇒ Object
52 53 54 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 52 def to_json(*args) to_hash.to_json(*args) end |
#work_done_progress ⇒ boolean
17 18 19 |
# File 'lib/language_server/protocol/interface/semantic_tokens_options.rb', line 17 def work_done_progress attributes.fetch(:workDoneProgress) end |