Table of Contents

Struct SourceInlayHint

Namespace
RDCore.SDK.Semantics.Refactoring
Assembly
RDCore.SDK.dll

An inlay hint of a module: what it says, in square brackets, and the place of the module's source it is shown at, before the character there.

public readonly record struct SourceInlayHint : IEquatable<SourceInlayHint>
Implements
Inherited Members

Constructors

SourceInlayHint(SourcePosition, string, InlayHintSite, bool, bool)

An inlay hint of a module: what it says, in square brackets, and the place of the module's source it is shown at, before the character there.

public SourceInlayHint(SourcePosition Position, string Label, InlayHintSite Site, bool PaddingLeft = false, bool PaddingRight = false)

Parameters

Position SourcePosition

Where the hint is shown, in the module's source.

Label string

What the hint says, in its brackets: [X:], [DoSomething], [As Variant].

Site InlayHintSite

The kind of place it is shown at.

PaddingLeft bool

Whether a space is shown before it: a hint after a word is apart from it.

PaddingRight bool

Whether a space is shown after it: a hint before a keyword is apart from it.

Properties

Label

What the hint says, in its brackets: [X:], [DoSomething], [As Variant].

public string Label { get; init; }

Property Value

string

PaddingLeft

Whether a space is shown before it: a hint after a word is apart from it.

public bool PaddingLeft { get; init; }

Property Value

bool

PaddingRight

Whether a space is shown after it: a hint before a keyword is apart from it.

public bool PaddingRight { get; init; }

Property Value

bool

Position

Where the hint is shown, in the module's source.

public SourcePosition Position { get; init; }

Property Value

SourcePosition

Site

The kind of place it is shown at.

public InlayHintSite Site { get; init; }

Property Value

InlayHintSite

Methods

ToInlayHint(Position)

The hint as an LSP inlay hint (LSP 3.17 §Inlay Hint Request), at a position of the client's document. It is complete: there is nothing to resolve.

public InlayHint ToInlayHint(Position position)

Parameters

position Position

Where the hint is in the client's document, which for a document that is part of a module is not where it is in the module.

Returns

InlayHint

Remarks

The hint of an argument is of kind Parameter, and that of a type of kind Type; the others are of no kind.