Class: LanguageServer::Protocol::Interface::SemanticTokensRegistrationOptions
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::SemanticTokensRegistrationOptions
- Defined in:
- lib/language_server/protocol/interface/semantic_tokens_registration_options.rb
Overview
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
Instance Method Summary collapse
-
#document_selector ⇒ DocumentSelector | null
A document selector to identify the scope of the registration.
-
#full ⇒ boolean | { delta:boolean } | nil
Server supports providing semantic tokens for a full document.
-
#id ⇒ string | nil
The id used to register the request.
-
#initialize(document_selector:, legend:, range: nil, full: nil, work_done_progress: nil, id: nil) ⇒ SemanticTokensRegistrationOptions
constructor
A new instance of SemanticTokensRegistrationOptions.
-
#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(document_selector:, legend:, range: nil, full: nil, work_done_progress: nil, id: nil) ⇒ SemanticTokensRegistrationOptions
Returns a new instance of SemanticTokensRegistrationOptions.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/language_server/protocol/interface/semantic_tokens_registration_options.rb', line 8 def initialize(document_selector:, legend:, range: nil, full: nil, work_done_progress: nil, id: nil) @attributes = {} @attributes[:documentSelector] = document_selector @attributes[:legend] = legend @attributes[:range] = range if range @attributes[:full] = full if full @attributes[:workDoneProgress] = work_done_progress if work_done_progress @attributes[:id] = id if id @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
69 70 71 |
# File 'lib/language_server/protocol/interface/semantic_tokens_registration_options.rb', line 69 def attributes @attributes end |
Instance Method Details
#document_selector ⇒ DocumentSelector | null
A document selector to identify the scope of the registration. If set to null the document selector provided on the client side will be used.
26 27 28 |
# File 'lib/language_server/protocol/interface/semantic_tokens_registration_options.rb', line 26 def document_selector attributes.fetch(:documentSelector) end |
#full ⇒ boolean | { delta:boolean } | nil
Server supports providing semantic tokens for a full document.
51 52 53 |
# File 'lib/language_server/protocol/interface/semantic_tokens_registration_options.rb', line 51 def full attributes.fetch(:full) end |
#id ⇒ string | nil
The id used to register the request. The id can be used to deregister the request again. See also Registration#id.
65 66 67 |
# File 'lib/language_server/protocol/interface/semantic_tokens_registration_options.rb', line 65 def id attributes.fetch(:id) end |
#legend ⇒ SemanticTokensLegend
The legend used by the server
34 35 36 |
# File 'lib/language_server/protocol/interface/semantic_tokens_registration_options.rb', line 34 def legend attributes.fetch(:legend) end |
#range ⇒ boolean | { } | nil
Server supports providing semantic tokens for a specific range of a document.
43 44 45 |
# File 'lib/language_server/protocol/interface/semantic_tokens_registration_options.rb', line 43 def range attributes.fetch(:range) end |
#to_hash ⇒ Object
71 72 73 |
# File 'lib/language_server/protocol/interface/semantic_tokens_registration_options.rb', line 71 def to_hash attributes end |
#to_json(*args) ⇒ Object
75 76 77 |
# File 'lib/language_server/protocol/interface/semantic_tokens_registration_options.rb', line 75 def to_json(*args) to_hash.to_json(*args) end |
#work_done_progress ⇒ boolean | nil
56 57 58 |
# File 'lib/language_server/protocol/interface/semantic_tokens_registration_options.rb', line 56 def work_done_progress attributes.fetch(:workDoneProgress) end |