Skip to content

LanguageServerConfiguration ​

Namespace: Hex1b.LanguageServer

Assembly: Hex1b.dll

Configuration for connecting to a language server. Built via the fluent API on .

csharp
public sealed class LanguageServerConfiguration

Inheritance ​

Object → LanguageServerConfiguration

Properties ​

DocumentUri ​

Document URI for the editor's document.

Returns: String

csharp
public string? DocumentUri { get; set; }

EnableCompletionValue ​

Whether to enable completion support.

Returns: Boolean

csharp
public bool EnableCompletionValue { get; set; }

EnableDiagnosticsValue ​

Whether to show diagnostics from the server.

Returns: Boolean

csharp
public bool EnableDiagnosticsValue { get; set; }

EnableSemanticHighlightingValue ​

Whether to request semantic highlighting from the server.

Returns: Boolean

csharp
public bool EnableSemanticHighlightingValue { get; set; }

LanguageId ​

LSP language identifier (e.g., "csharp", "cpp", "python").

Returns: String

csharp
public string? LanguageId { get; set; }

RootUri ​

Root URI for the workspace.

Returns: String

csharp
public string? RootUri { get; set; }

ServerArguments ​

Arguments to pass to the server executable.

Returns: String[]

csharp
public string[]? ServerArguments { get; set; }

ServerCommand ​

Path to the language server executable.

Returns: String

csharp
public string? ServerCommand { get; set; }

SocketPath ​

Unix domain socket path for connecting to an existing server.

Returns: String

csharp
public string? SocketPath { get; set; }

WorkingDirectory ​

Working directory for the server process.

Returns: String

csharp
public string? WorkingDirectory { get; set; }

Methods ​

EnableCompletion(bool) ​

Enables or disables completion support.

Parameters:

Returns: LanguageServerConfiguration

csharp
public LanguageServerConfiguration EnableCompletion(bool enable = true)

EnableDiagnostics(bool) ​

Enables or disables diagnostic underlines.

Parameters:

Returns: LanguageServerConfiguration

csharp
public LanguageServerConfiguration EnableDiagnostics(bool enable = true)

EnableSemanticHighlighting(bool) ​

Enables or disables semantic highlighting.

Parameters:

Returns: LanguageServerConfiguration

csharp
public LanguageServerConfiguration EnableSemanticHighlighting(bool enable = true)

WithLanguageId(string) ​

Sets the LSP language identifier.

Parameters:

Returns: LanguageServerConfiguration

csharp
public LanguageServerConfiguration WithLanguageId(string languageId)

WithRootUri(string) ​

Sets the workspace root URI.

Parameters:

Returns: LanguageServerConfiguration

csharp
public LanguageServerConfiguration WithRootUri(string rootUri)

WithServerCommand(string, params string[]) ​

Sets the language server command to launch.

Parameters:

Returns: LanguageServerConfiguration

csharp
public LanguageServerConfiguration WithServerCommand(string command, params string[] args)

WithSocket(string) ​

Connects to an existing server via Unix domain socket.

Parameters:

Returns: LanguageServerConfiguration

csharp
public LanguageServerConfiguration WithSocket(string socketPath)

WithTransport(Stream, Stream) ​

Sets a pre-configured transport (for in-process servers or testing). When set, no process is spawned and no socket is opened.

Parameters:

  • serverOutputStream (Stream): Stream to read server responses from.
  • serverInputStream (Stream): Stream to write client requests to.

Returns: LanguageServerConfiguration

csharp
public LanguageServerConfiguration WithTransport(Stream serverOutputStream, Stream serverInputStream)

WithWorkingDirectory(string) ​

Sets the working directory for the server process.

Parameters:

Returns: LanguageServerConfiguration

csharp
public LanguageServerConfiguration WithWorkingDirectory(string path)

Released under the MIT License.