Class: LanguageServer::Protocol::Interface::DocumentSymbolClientCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::DocumentSymbolClientCapabilities
- Defined in:
- lib/language_server/protocol/interface/document_symbol_client_capabilities.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#dynamic_registration ⇒ boolean
Whether document symbol supports dynamic registration.
-
#hierarchical_document_symbol_support ⇒ boolean
The client supports hierarchical document symbols.
-
#initialize(dynamic_registration: nil, symbol_kind: nil, hierarchical_document_symbol_support: nil, tag_support: nil, label_support: nil) ⇒ DocumentSymbolClientCapabilities
constructor
A new instance of DocumentSymbolClientCapabilities.
-
#label_support ⇒ boolean
The client supports an additional label presented in the UI when registering a document symbol provider.
-
#symbol_kind ⇒ { valueSet?: SymbolKind[]; }
Specific capabilities for the ‘SymbolKind` in the `textDocument/documentSymbol` request.
-
#tag_support ⇒ { valueSet: 1[]; }
The client supports tags on ‘SymbolInformation`.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(dynamic_registration: nil, symbol_kind: nil, hierarchical_document_symbol_support: nil, tag_support: nil, label_support: nil) ⇒ DocumentSymbolClientCapabilities
Returns a new instance of DocumentSymbolClientCapabilities.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/language_server/protocol/interface/document_symbol_client_capabilities.rb', line 5 def initialize(dynamic_registration: nil, symbol_kind: nil, hierarchical_document_symbol_support: nil, tag_support: nil, label_support: nil) @attributes = {} @attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration @attributes[:symbolKind] = symbol_kind if symbol_kind @attributes[:hierarchicalDocumentSymbolSupport] = hierarchical_document_symbol_support if hierarchical_document_symbol_support @attributes[:tagSupport] = tag_support if tag_support @attributes[:labelSupport] = label_support if label_support @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
61 62 63 |
# File 'lib/language_server/protocol/interface/document_symbol_client_capabilities.rb', line 61 def attributes @attributes end |
Instance Method Details
#dynamic_registration ⇒ boolean
Whether document symbol supports dynamic registration.
21 22 23 |
# File 'lib/language_server/protocol/interface/document_symbol_client_capabilities.rb', line 21 def dynamic_registration attributes.fetch(:dynamicRegistration) end |
#hierarchical_document_symbol_support ⇒ boolean
The client supports hierarchical document symbols.
38 39 40 |
# File 'lib/language_server/protocol/interface/document_symbol_client_capabilities.rb', line 38 def hierarchical_document_symbol_support attributes.fetch(:hierarchicalDocumentSymbolSupport) end |
#label_support ⇒ boolean
The client supports an additional label presented in the UI when registering a document symbol provider.
57 58 59 |
# File 'lib/language_server/protocol/interface/document_symbol_client_capabilities.rb', line 57 def label_support attributes.fetch(:labelSupport) end |
#symbol_kind ⇒ { valueSet?: SymbolKind[]; }
Specific capabilities for the ‘SymbolKind` in the `textDocument/documentSymbol` request.
30 31 32 |
# File 'lib/language_server/protocol/interface/document_symbol_client_capabilities.rb', line 30 def symbol_kind attributes.fetch(:symbolKind) end |
#tag_support ⇒ { valueSet: 1[]; }
The client supports tags on ‘SymbolInformation`. Tags are supported on `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. Clients supporting tags have to handle unknown tags gracefully.
48 49 50 |
# File 'lib/language_server/protocol/interface/document_symbol_client_capabilities.rb', line 48 def tag_support attributes.fetch(:tagSupport) end |
#to_hash ⇒ Object
63 64 65 |
# File 'lib/language_server/protocol/interface/document_symbol_client_capabilities.rb', line 63 def to_hash attributes end |
#to_json(*args) ⇒ Object
67 68 69 |
# File 'lib/language_server/protocol/interface/document_symbol_client_capabilities.rb', line 67 def to_json(*args) to_hash.to_json(*args) end |