class LSProtocol::FoldingRange

Overview

Represents a folding range. To be valid, start and end line must be bigger than zero and smaller than the number of lines in the document. Clients are free to ignore invalid ranges.

Included Modules

Defined in:

lsprotocol/types.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(end_line : UInt32 | Nil, start_line : UInt32 | Nil, collapsed_text : String | Nil = nil, end_character : UInt32 | Nil = nil, kind : FoldingRangeKind | String | Nil = nil, start_character : UInt32 | Nil = nil) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def collapsed_text : String | Nil #

The text that the client should show when the specified range is collapsed. If not defined or not supported by the client, a default will be chosen by the client.

@since 3.17.0


[View source]
def end_character : UInt32 | Nil #

The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.


[View source]
def end_line : UInt32 #

The zero-based end line of the range to fold. The folded area ends with the line's last character. To be valid, the end must be zero or larger and smaller than the number of lines in the document.


[View source]
def kind : FoldingRangeKind | String | Nil #

Describes the kind of the folding range such as 'comment' or 'region'. The kind is used to categorize folding ranges and used by commands like 'Fold all comments'. See FoldingRangeKind for an enumeration of standardized kinds.


[View source]
def start_character : UInt32 | Nil #

The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.


[View source]
def start_line : UInt32 #

The zero-based start line of the range to fold. The folded area starts after the line's last character. To be valid, the end must be zero or larger and smaller than the number of lines in the document.


[View source]