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 | nil
Whether implementation supports dynamic registration for folding range providers.
-
#folding_range ⇒ { collapsedText:boolean } | nil
Specific options for the folding range.
-
#folding_range_kind ⇒ { valueSet:FoldingRangeKind[] } | nil
Specific options for the folding range kind.
-
#initialize(dynamic_registration: nil, range_limit: nil, line_folding_only: nil, folding_range_kind: nil, folding_range: nil) ⇒ FoldingRangeClientCapabilities
constructor
A new instance of FoldingRangeClientCapabilities.
-
#line_folding_only ⇒ boolean | nil
If set, the client signals that it only supports folding complete lines.
-
#range_limit ⇒ uinteger | nil
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, folding_range_kind: nil, folding_range: nil) ⇒ FoldingRangeClientCapabilities
Returns a new instance of FoldingRangeClientCapabilities.
5 6 7 8 9 10 11 12 13 14 15 |
# 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, folding_range_kind: nil, folding_range: 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[:foldingRangeKind] = folding_range_kind if folding_range_kind @attributes[:foldingRange] = folding_range if folding_range @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
68 69 70 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 68 def attributes @attributes end |
Instance Method Details
#dynamic_registration ⇒ boolean | nil
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.
24 25 26 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 24 def dynamic_registration attributes.fetch(:dynamicRegistration) end |
#folding_range ⇒ { collapsedText:boolean } | nil
Specific options for the folding range.
64 65 66 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 64 def folding_range attributes.fetch(:foldingRange) end |
#folding_range_kind ⇒ { valueSet:FoldingRangeKind[] } | nil
Specific options for the folding range kind.
54 55 56 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 54 def folding_range_kind attributes.fetch(:foldingRangeKind) end |
#line_folding_only ⇒ boolean | nil
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.
44 45 46 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 44 def line_folding_only attributes.fetch(:lineFoldingOnly) end |
#range_limit ⇒ uinteger | nil
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.
34 35 36 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 34 def range_limit attributes.fetch(:rangeLimit) end |
#to_hash ⇒ Object
70 71 72 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 70 def to_hash attributes end |
#to_json(*args) ⇒ Object
74 75 76 |
# File 'lib/language_server/protocol/interface/folding_range_client_capabilities.rb', line 74 def to_json(*args) to_hash.to_json(*args) end |