lspeasy / client/src / ClientOptions
Interface: ClientOptions<ClientCaps>
Defined in: packages/client/src/types.ts:38
Configuration for an LSPClient instance.
Remarks
Passed to the LSPClient constructor. All fields are optional; the client works with zero configuration.
Config
Type Parameters
| Type Parameter | Default type |
|---|---|
ClientCaps extends Partial<Transport> | Transport |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
capabilities? | ClientCaps | Client capabilities to advertise | packages/client/src/types.ts:54 |
dynamicRegistration? | any | Behavior controls for server-driven dynamic registration. | packages/client/src/types.ts:109 |
heartbeat? | HeartbeatConfig | Optional heartbeat configuration (disabled by default). | packages/client/src/types.ts:104 |
initializationOptions? | unknown | Arbitrary initialization options passed to the server in the initialize request's initializationOptions field. Remarks Used by the proxy path to tell the proxy daemon which backend language server to activate for this session (e.g. { languageId: 'typescript' }). | packages/client/src/types.ts:124 |
logger? | any | Logger instance for client logging | packages/client/src/types.ts:77 |
logLevel? | any | Log level for built-in console logger | packages/client/src/types.ts:82 |
middleware? | any[] | Optional middleware chain for clientToServer/serverToClient messages. | packages/client/src/types.ts:99 |
name? | string | Client identification (sent in initialize request) | packages/client/src/types.ts:44 |
onValidationError? | (error, response) => void | Callback for response validation errors | packages/client/src/types.ts:114 |
requestTimeout? | number | Default request timeout in milliseconds for outgoing requests | packages/client/src/types.ts:87 |
rootUri? | string | null | Workspace root URI sent in the initialize request (rootUri). Defaults to null. Although rootUri is deprecated in the LSP spec in favour of workspaceFolders, many servers (e.g. typescript-language-server) still read it to locate the project root, so set it for reliable indexing. | packages/client/src/types.ts:63 |
strictCapabilities? | boolean | Strict capability checking mode When true, throws error if handler registered or request sent for unsupported capability When false, logs warning and allows registration/sending (default: false) | packages/client/src/types.ts:94 |
version? | string | Client version | packages/client/src/types.ts:49 |
workspaceFolders? | | { name: string; uri: string; }[] | null | Workspace folders sent in the initialize request. The modern replacement for rootUri. When omitted and rootUri is set, the client does not synthesize folders — pass them explicitly if the server relies on workspaceFolders. | packages/client/src/types.ts:72 |