struct LSP::DocumentSymbol

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

Defined in:

lsp/document_symbol.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def children : Array(DocumentSymbol) | Nil #

Children of this symbol, e.g. properties of a class.


[View source]
def children=(children : Array(DocumentSymbol) | Nil) #

Children of this symbol, e.g. properties of a class.


[View source]
def deprecated : Bool | Nil #

Indicates if this symbol is deprecated.

@deprecated Use tags instead


[View source]
def deprecated=(deprecated : Bool | Nil) #

Indicates if this symbol is deprecated.

@deprecated Use tags instead


[View source]
def detail : String | Nil #

More detail for this symbol, e.g the signature of a function.


[View source]
def detail=(detail : String | Nil) #

More detail for this symbol, e.g the signature of a function.


[View source]
def kind : SymbolKind #

[View source]
def kind=(kind : SymbolKind) #

[View source]
def name : String #

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.


[View source]
def name=(name : String) #

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.


[View source]
def range : Range #

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.


[View source]
def range=(range : Range) #

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.


[View source]
def select_range : Range #

[View source]
def select_range=(select_range : Range) #

[View source]
def tags : Array(SymbolTag) | Nil #

FIXME : How to serialize an array of enums? Tags for this document symbol.


[View source]
def tags=(tags : Array(SymbolTag) | Nil) #

FIXME : How to serialize an array of enums? Tags for this document symbol.


[View source]