class

LSProtocol::CodeLens

Inherits JSON::Serializable / Reference / Object

A code lens represents a Command that should be shown along with source text, like the number of references, a way to run tests, etc.

A code lens is unresolved when no command is associated to it. For performance reasons the creation of a code lens and resolving should be done in two stages.

Constructors

new(pull : JSON::PullParser)
Source
new(range : Range | Nil, command : Command | Nil = nil, data : LSPAny | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

command

The command this code lens represents.

Source
data

A data entry field that is preserved on a code lens item between a CodeLensRequest and a CodeLensResolveRequest

Source
range

The range in which this code lens is valid. Should only span a single line.

Source