Skip to content

TypeScriptLspPluginOptions

TypeScriptLspPluginOptions = object

readonly optional canonicalPaths?: Readonly<Record<string, string>>

Logical filesystem names mapped to their canonical source identity.


readonly optional capabilities?: lsp.ClientCapabilities

Merged over defaultClientCapabilities(). Build a semantic-tokens block with semanticTokensClientCapability() from @singapore-editor/lsp rather than by hand — the worker advertises semanticTokensProvider, but a server only answers a client that asked.


readonly optional clientInfo?: lsp.InitializeParams["clientInfo"]


readonly optional compilerOptions?: ts.CompilerOptions


readonly optional connectionProvider?: LspConnectionProvider


readonly optional diagnosticDelayMs?: number


readonly optional documentSync?: LanguageServerDocumentSyncOptions


readonly optional getDiagnosticActions?: LanguageServerDiagnosticActions


readonly optional libraryFiles?: "bundled" | "cdn" | TypeScriptLspLibraryLoader

The standard library: bundled with this package unless the host opts into the CDN or its own.


readonly optional onApplyWorkspaceEdit?: OnApplyWorkspaceEdit

Applies rename and code-action edits. Without it, an edit that spans files cannot land and reports that instead.


readonly optional onDiagnostics?: (summary) => void

TypeScriptLspDiagnosticSummary

void


readonly optional onError?: (error) => void

unknown

void


readonly optional onOpenDefinition?: (target, options?) => void | boolean

TypeScriptLspDefinitionTarget

TypeScriptLspNavigationOptions

void | boolean


readonly optional onOpenReferences?: (result) => void | boolean

TypeScriptLspReferencesResult

void | boolean


readonly optional onRequestError?: (method, error) => void

string

unknown

void


readonly optional onStatusChange?: (status) => void

TypeScriptLspStatus

void


readonly optional rootUri?: lsp.DocumentUri | null


readonly optional semanticTokens?: LanguageServerSemanticTokensOptions

Turns on the semantic token layer and is how a host gets hold of one. Supplying nothing creates no layer and fires no demand signal, so an app that paints no semantic colour pays nothing.


readonly optional timeoutMs?: number


readonly optional webSocketRoute?: string | URL


readonly optional webSocketTransportOptions?: LspWebSocketTransportOptions


readonly optional workerFactory?: () => LspWorkerLike

LspWorkerLike


readonly optional workspace?: TypeScriptLspWorkspace

optional onConnectionCreated(context): void | EditorDisposable

Hands the host the connection the moment it exists, which is the only way to reach the LspClient — and therefore to issue a token request, cancel one, or override its timeout. Runs alongside this plugin’s own registration rather than replacing it.

LanguageServerConnectionContext

void | EditorDisposable