Skip to content

LanguageServerExtensions

Namespace: Hex1b

Assembly: Hex1b.dll

Extension methods for adding language server support to the .

csharp
public static class LanguageServerExtensions

Inheritance

ObjectLanguageServerExtensions

Methods

LanguageServer(EditorWidget, Action<LanguageServerConfiguration>)

Connects a language server to this editor, enabling semantic highlighting, diagnostic underlines, and completion overlays.

Parameters:

Returns: EditorWidget

A new editor widget with the language server decoration provider added.

csharp
public static EditorWidget LanguageServer(this EditorWidget editor, Action<LanguageServerConfiguration> configure)

LanguageServer(EditorWidget, Hex1bDocumentWorkspace)

Connects this editor to a language server managed by a . The workspace resolves the appropriate server based on the document's file path and glob mappings registered with or . In-process decoration providers are checked first, then language server providers.

Parameters:

Returns: EditorWidget

The editor widget, with a decoration provider if a server matches.

csharp
public static EditorWidget LanguageServer(this EditorWidget editor, Hex1bDocumentWorkspace workspace)

LanguageServer(EditorWidget, Hex1bLanguageServerWorkspace, string, string?)

Connects this editor to a language server managed by a workspace. The workspace handles server lifecycle and connection sharing — multiple documents of the same language share a single server process.

Parameters:

  • editor (EditorWidget): The editor widget to enhance.
  • workspace (Hex1bLanguageServerWorkspace): The workspace that manages server instances.
  • documentUri (String): The document's URI (e.g., file:///path/to/file.cs). Used to identify this document to the language server.
  • languageId (String): LSP language identifier. If null, inferred from the document URI extension.

Returns: EditorWidget

A new editor widget with the workspace-managed decoration provider.

csharp
public static EditorWidget LanguageServer(this EditorWidget editor, Hex1bLanguageServerWorkspace workspace, string documentUri, string? languageId = null)

Released under the MIT License.