Skip to main content

DeclarationLink

Type Alias DeclarationLink 

Source
pub type DeclarationLink = LocationLink;
Expand description

Information about where a symbol is declared.

Provides additional metadata over normal location declarations, including the range of the declaring symbol.

Servers should prefer returning DeclarationLink over Declaration if supported by the client.

Aliased Type§

pub struct DeclarationLink {
    pub origin_selection_range: Option<Range>,
    pub target_uri: Uri,
    pub target_range: Range,
    pub target_selection_range: Range,
}

Fields§

§origin_selection_range: Option<Range>

Span of the origin of this link.

Used as the underlined span for mouse interaction. Defaults to the word range at the definition position.

§target_uri: Uri

The target resource identifier of this link.

§target_range: Range

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.

§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. Must be contained by the targetRange. See also DocumentSymbol#range