class LSProtocol::CodeLens

Overview

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.

Included Modules

Defined in:

lsprotocol/types.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]
def self.new(range : Range | Nil, command : Command | Nil = nil, data : LSPAny | Nil = nil) #

[View source]

Instance Method Detail

def command : Command | Nil #

The command this code lens represents.


[View source]
def data : LSPAny | Nil #

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


[View source]
def range : Range #

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


[View source]