Class: LSP::FoldingRangeClientCapabilities

Inherits:
LSPBase
  • Object
show all
Defined in:
lib/lsp/lsp_protocol_foldingrange.rb

Overview

export interface FoldingRangeClientCapabilities

/**
 * 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.
 */
dynamicRegistration?: boolean;
/**
 * 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.
 */
rangeLimit?: number;
/**
 * 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.
 */
lineFoldingOnly?: boolean;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ FoldingRangeClientCapabilities

Returns a new instance of FoldingRangeClientCapabilities.



32
33
34
35
# File 'lib/lsp/lsp_protocol_foldingrange.rb', line 32

def initialize(initial_hash = nil)
  super
  @optional_method_names = i[dynamicRegistration rangeLimit lineFoldingOnly]
end

Instance Attribute Details

#dynamicRegistrationObject

type: boolean # type: number # type: boolean



30
31
32
# File 'lib/lsp/lsp_protocol_foldingrange.rb', line 30

def dynamicRegistration
  @dynamicRegistration
end

#lineFoldingOnlyObject

type: boolean # type: number # type: boolean



30
31
32
# File 'lib/lsp/lsp_protocol_foldingrange.rb', line 30

def lineFoldingOnly
  @lineFoldingOnly
end

#rangeLimitObject

type: boolean # type: number # type: boolean



30
31
32
# File 'lib/lsp/lsp_protocol_foldingrange.rb', line 30

def rangeLimit
  @rangeLimit
end

Instance Method Details

#from_h!(value) ⇒ Object



37
38
39
40
41
42
43
# File 'lib/lsp/lsp_protocol_foldingrange.rb', line 37

def from_h!(value)
  value = {} if value.nil?
  self.dynamicRegistration = value['dynamicRegistration'] # Unknown type
  self.rangeLimit = value['rangeLimit']
  self.lineFoldingOnly = value['lineFoldingOnly'] # Unknown type
  self
end