class LSProtocol::LocationLink
- LSProtocol::LocationLink
- Reference
- Object
Overview
Represents the connection of two locations. Provides additional metadata over normal Location
,
including an origin range.
Included Modules
- JSON::Serializable
Defined in:
lsprotocol/types.crConstructors
- .new(target_range : Range | Nil, target_selection_range : Range | Nil, target_uri : URI | Nil, origin_selection_range : Range | Nil = nil)
- .new(pull : JSON::PullParser)
Instance Method Summary
-
#origin_selection_range : Range | Nil
Span of the origin of this link.
-
#target_range : Range
The full target range of this link.
-
#target_selection_range : Range
The range that should be selected and revealed when this link is being followed, e.g the name of a function.
-
#target_uri : URI
The target resource identifier of this link.
Constructor Detail
Instance Method Detail
Span of the origin of this link.
Used as the underlined span for mouse interaction. Defaults to the word range at the definition position.
The full target range of this link. If the target for example is a symbol then target range is the range enclosing this symbol not including leading/trailing whitespace but everything else like comments. This information is typically used to highlight the range in the editor.
The range that should be selected and revealed when this link is being followed, e.g the name of a function.
Must be contained by the targetRange
. See also DocumentSymbol#range