LanguageServerDecorationProvider
Namespace: Hex1b.LanguageServer
Assembly: Hex1b.dll
An that connects to a language server and bridges semantic tokens, diagnostics, and completions to the editor's decoration and overlay APIs.
public sealed class LanguageServerDecorationProvider : ITextDecorationProvider, IAsyncDisposableInheritance
Object → LanguageServerDecorationProvider
Implements
Constructors
LanguageServerDecorationProvider(LanguageServerConfiguration)
Parameters:
config(LanguageServerConfiguration):
public LanguageServerDecorationProvider(LanguageServerConfiguration config)Properties
CurrentDiagnostics
The current diagnostics for this document, updated from publishDiagnostics notifications.
Returns: IReadOnlyList<DiagnosticInfo>
public IReadOnlyList<DiagnosticInfo> CurrentDiagnostics { get; }IsConnected
Whether the language server is connected and initialized.
Returns: Boolean
public bool IsConnected { get; }Methods
Activate(IEditorSession)
Called when the provider is connected to an editor. Receives an that the provider can use to interact with the editor (e.g., push overlays, request re-renders).
Parameters:
session(IEditorSession): The editor session handle.
public void Activate(IEditorSession session)Deactivate()
Called when the provider is disconnected from an editor. Implementations should clean up any resources or subscriptions.
public void Deactivate()DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
Returns: ValueTask
A task that represents the asynchronous dispose operation.
public ValueTask DisposeAsync()GetDecorations(int, int, IHex1bDocument)
Returns decorations for the specified range of visible lines. Only lines within the viewport are requested; providers should not compute decorations for the entire document.
Parameters:
startLine(Int32): First visible line (1-based).endLine(Int32): Last visible line (1-based).document(IHex1bDocument): The document being rendered.
Returns: IReadOnlyList<TextDecorationSpan>
Decoration spans covering the requested line range.
public IReadOnlyList<TextDecorationSpan> GetDecorations(int startLine, int endLine, IHex1bDocument document)