TypeScriptLspPluginOptions
TypeScriptLspPluginOptions =
object
Properties
Section titled “Properties”canonicalPaths?
Section titled “canonicalPaths?”
readonlyoptionalcanonicalPaths?:Readonly<Record<string,string>>
Logical filesystem names mapped to their canonical source identity.
capabilities?
Section titled “capabilities?”
readonlyoptionalcapabilities?: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.
clientInfo?
Section titled “clientInfo?”
readonlyoptionalclientInfo?:lsp.InitializeParams["clientInfo"]
compilerOptions?
Section titled “compilerOptions?”
readonlyoptionalcompilerOptions?:ts.CompilerOptions
connectionProvider?
Section titled “connectionProvider?”
readonlyoptionalconnectionProvider?:LspConnectionProvider
diagnosticDelayMs?
Section titled “diagnosticDelayMs?”
readonlyoptionaldiagnosticDelayMs?:number
documentSync?
Section titled “documentSync?”
readonlyoptionaldocumentSync?:LanguageServerDocumentSyncOptions
getDiagnosticActions?
Section titled “getDiagnosticActions?”
readonlyoptionalgetDiagnosticActions?:LanguageServerDiagnosticActions
libraryFiles?
Section titled “libraryFiles?”
readonlyoptionallibraryFiles?:"bundled"|"cdn"|TypeScriptLspLibraryLoader
The standard library: bundled with this package unless the host opts into the CDN or its own.
onApplyWorkspaceEdit?
Section titled “onApplyWorkspaceEdit?”
readonlyoptionalonApplyWorkspaceEdit?:OnApplyWorkspaceEdit
Applies rename and code-action edits. Without it, an edit that spans files cannot land and reports that instead.
onDiagnostics?
Section titled “onDiagnostics?”
readonlyoptionalonDiagnostics?: (summary) =>void
Parameters
Section titled “Parameters”summary
Section titled “summary”TypeScriptLspDiagnosticSummary
Returns
Section titled “Returns”void
onError?
Section titled “onError?”
readonlyoptionalonError?: (error) =>void
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void
onOpenDefinition?
Section titled “onOpenDefinition?”
readonlyoptionalonOpenDefinition?: (target,options?) =>void|boolean
Parameters
Section titled “Parameters”target
Section titled “target”options?
Section titled “options?”TypeScriptLspNavigationOptions
Returns
Section titled “Returns”void | boolean
onOpenReferences?
Section titled “onOpenReferences?”
readonlyoptionalonOpenReferences?: (result) =>void|boolean
Parameters
Section titled “Parameters”result
Section titled “result”Returns
Section titled “Returns”void | boolean
onRequestError?
Section titled “onRequestError?”
readonlyoptionalonRequestError?: (method,error) =>void
Parameters
Section titled “Parameters”method
Section titled “method”string
unknown
Returns
Section titled “Returns”void
onStatusChange?
Section titled “onStatusChange?”
readonlyoptionalonStatusChange?: (status) =>void
Parameters
Section titled “Parameters”status
Section titled “status”Returns
Section titled “Returns”void
rootUri?
Section titled “rootUri?”
readonlyoptionalrootUri?:lsp.DocumentUri|null
semanticTokens?
Section titled “semanticTokens?”
readonlyoptionalsemanticTokens?: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.
timeoutMs?
Section titled “timeoutMs?”
readonlyoptionaltimeoutMs?:number
webSocketRoute?
Section titled “webSocketRoute?”
readonlyoptionalwebSocketRoute?:string|URL
webSocketTransportOptions?
Section titled “webSocketTransportOptions?”
readonlyoptionalwebSocketTransportOptions?:LspWebSocketTransportOptions
workerFactory?
Section titled “workerFactory?”
readonlyoptionalworkerFactory?: () =>LspWorkerLike
Returns
Section titled “Returns”LspWorkerLike
workspace?
Section titled “workspace?”
readonlyoptionalworkspace?:TypeScriptLspWorkspace
Methods
Section titled “Methods”onConnectionCreated()?
Section titled “onConnectionCreated()?”
optionalonConnectionCreated(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.
Parameters
Section titled “Parameters”context
Section titled “context”LanguageServerConnectionContext
Returns
Section titled “Returns”void | EditorDisposable