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
PositionSourcePositionWhere the hint is shown, in the module's source.
LabelstringWhat the hint says, in its brackets:
[X:],[DoSomething],[As Variant].SiteInlayHintSiteThe kind of place it is shown at.
PaddingLeftboolWhether a space is shown before it: a hint after a word is apart from it.
PaddingRightboolWhether 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
PaddingLeft
Whether a space is shown before it: a hint after a word is apart from it.
public bool PaddingLeft { get; init; }
Property Value
PaddingRight
Whether a space is shown after it: a hint before a keyword is apart from it.
public bool PaddingRight { get; init; }
Property Value
Position
Where the hint is shown, in the module's source.
public SourcePosition Position { get; init; }
Property Value
Site
The kind of place it is shown at.
public InlayHintSite Site { get; init; }
Property Value
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
positionPositionWhere 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.