class LSProtocol::DocumentSymbol
- LSProtocol::DocumentSymbol
- Reference
- Object
Overview
Represents programming constructs like variables, classes, interfaces etc. that appear in a document. Document symbols can be hierarchical and they have two ranges: one that encloses its definition and one that points to its most interesting range, e.g. the range of an identifier.
Included Modules
- JSON::Serializable
Defined in:
lsprotocol/types.crConstructors
- .new(kind : SymbolKind | Nil, name : String | Nil, range : Range | Nil, selection_range : Range | Nil, children : Array(DocumentSymbol) | Nil = nil, deprecated : Bool | Nil = nil, detail : String | Nil = nil, tags : Array(SymbolTag) | Nil = nil)
- .new(pull : JSON::PullParser)
Instance Method Summary
-
#children : Array(DocumentSymbol) | Nil
Children of this symbol, e.g.
-
#deprecated : Bool | Nil
Indicates if this symbol is deprecated.
-
#detail : String | Nil
More detail for this symbol, e.g the signature of a function.
-
#kind : SymbolKind
The kind of this symbol.
-
#name : String
The name of this symbol.
-
#range : Range
The range enclosing this symbol not including leading/trailing whitespace but everything else like comments.
-
#selection_range : Range
The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
-
#tags : Array(SymbolTag) | Nil
Tags for this document symbol.
Constructor Detail
Instance Method Detail
The name of this symbol. Will be displayed in the user interface and therefore must not be an empty string or a string only consisting of white spaces.
The range enclosing this symbol not including leading/trailing whitespace but everything else like comments. This information is typically used to determine if the clients cursor is inside the symbol to reveal in the symbol in the UI.
The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
Must be contained by the #range
.