class LSProtocol::DocumentLink

Overview

A document link is a range in a text document that links to an internal or external resource, like another text document or a web site.

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, data : LSPAny | Nil = nil, target : URI | Nil = nil, tooltip : String | Nil = nil) #

[View source]

Instance Method Detail

def data : LSPAny | Nil #

A data entry field that is preserved on a document link between a DocumentLinkRequest and a DocumentLinkResolveRequest.


[View source]
def range : Range #

The range this link applies to.


[View source]
def target : URI | Nil #

The uri this link points to. If missing a resolve request is sent later.


[View source]
def tooltip : String | Nil #

The tooltip text when you hover over this link.

If a tooltip is provided, is will be displayed in a string that includes instructions on how to trigger the link, such as {0} (ctrl + click). The specific instructions vary depending on OS, user settings, and localization.

@since 3.15.0


[View source]