LanguageServerConfiguration
Namespace: Hex1b.LanguageServer
Assembly: Hex1b.dll
Configuration for connecting to a language server. Built via the fluent API on .
public sealed class LanguageServerConfigurationInheritance
Object → LanguageServerConfiguration
Properties
DocumentUri
Document URI for the editor's document.
Returns: String
public string? DocumentUri { get; set; }EnableCompletionValue
Whether to enable completion support.
Returns: Boolean
public bool EnableCompletionValue { get; set; }EnableDiagnosticsValue
Whether to show diagnostics from the server.
Returns: Boolean
public bool EnableDiagnosticsValue { get; set; }EnableSemanticHighlightingValue
Whether to request semantic highlighting from the server.
Returns: Boolean
public bool EnableSemanticHighlightingValue { get; set; }LanguageId
LSP language identifier (e.g., "csharp", "cpp", "python").
Returns: String
public string? LanguageId { get; set; }RootUri
Root URI for the workspace.
Returns: String
public string? RootUri { get; set; }ServerArguments
Arguments to pass to the server executable.
Returns: String[]
public string[]? ServerArguments { get; set; }ServerCommand
Path to the language server executable.
Returns: String
public string? ServerCommand { get; set; }SocketPath
Unix domain socket path for connecting to an existing server.
Returns: String
public string? SocketPath { get; set; }WorkingDirectory
Working directory for the server process.
Returns: String
public string? WorkingDirectory { get; set; }Methods
EnableCompletion(bool)
Enables or disables completion support.
Parameters:
enable(Boolean):
Returns: LanguageServerConfiguration
public LanguageServerConfiguration EnableCompletion(bool enable = true)EnableDiagnostics(bool)
Enables or disables diagnostic underlines.
Parameters:
enable(Boolean):
Returns: LanguageServerConfiguration
public LanguageServerConfiguration EnableDiagnostics(bool enable = true)EnableSemanticHighlighting(bool)
Enables or disables semantic highlighting.
Parameters:
enable(Boolean):
Returns: LanguageServerConfiguration
public LanguageServerConfiguration EnableSemanticHighlighting(bool enable = true)WithLanguageId(string)
Sets the LSP language identifier.
Parameters:
languageId(String):
Returns: LanguageServerConfiguration
public LanguageServerConfiguration WithLanguageId(string languageId)WithRootUri(string)
Sets the workspace root URI.
Parameters:
rootUri(String):
Returns: LanguageServerConfiguration
public LanguageServerConfiguration WithRootUri(string rootUri)WithServerCommand(string, params string[])
Sets the language server command to launch.
Parameters:
Returns: LanguageServerConfiguration
public LanguageServerConfiguration WithServerCommand(string command, params string[] args)WithSocket(string)
Connects to an existing server via Unix domain socket.
Parameters:
socketPath(String):
Returns: LanguageServerConfiguration
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
public LanguageServerConfiguration WithTransport(Stream serverOutputStream, Stream serverInputStream)WithWorkingDirectory(string)
Sets the working directory for the server process.
Parameters:
path(String):
Returns: LanguageServerConfiguration
public LanguageServerConfiguration WithWorkingDirectory(string path)