Class: LanguageServer::Protocol::Interface::FoldingRangeClientCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::FoldingRangeClientCapabilities
- Defined in:
- lib/language_server/protocol/interface/folding_range_client_capabilities.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#dynamic_registration ⇒ boolean
Whether implementation supports dynamic registration for folding range providers.
-
#initialize(dynamic_registration: nil, range_limit: nil, line_folding_only: nil) ⇒ FoldingRangeClientCapabilities
constructor
A new instance of FoldingRangeClientCapabilities.
-
#line_folding_only ⇒ boolean
If set, the client signals that it only supports folding complete lines.
-
#range_limit ⇒ number
The maximum number of folding ranges that the client prefers to receive per document.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(dynamic_registration: nil, range_limit: nil, line_folding_only: nil) ⇒ FoldingRangeClientCapabilities
Returns a new instance of FoldingRangeClientCapabilities.
5 6 7 8 9 10 11 12 13 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 5 def initialize(dynamic_registration: nil, range_limit: nil, line_folding_only: nil) @attributes = {} @attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration @attributes[:rangeLimit] = range_limit if range_limit @attributes[:lineFoldingOnly] = line_folding_only if line_folding_only @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
46 47 48 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 46 def attributes @attributes end |
Instance Method Details
#dynamic_registration ⇒ boolean
Whether implementation supports dynamic registration for folding range providers. If this is set to true the client supports the new FoldingRangeRegistrationOptions return value for the corresponding server capability as well.
22 23 24 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 22 def dynamic_registration attributes.fetch(:dynamicRegistration) end |
#line_folding_only ⇒ boolean
If set, the client signals that it only supports folding complete lines. If set, client will ignore specified startCharacter and endCharacter properties in a FoldingRange.
42 43 44 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 42 def line_folding_only attributes.fetch(:lineFoldingOnly) end |
#range_limit ⇒ number
The maximum number of folding ranges that the client prefers to receive per document. The value serves as a hint, servers are free to follow the limit.
32 33 34 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 32 def range_limit attributes.fetch(:rangeLimit) end |
#to_hash ⇒ Object
48 49 50 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 48 def to_hash attributes end |
#to_json(*args) ⇒ Object
52 53 54 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 52 def to_json(*args) to_hash.to_json(*args) end |