LspConnectionOptions
LspConnectionOptions =
object
Properties
Section titled “Properties”capabilities?
Section titled “capabilities?”
readonlyoptionalcapabilities?:lsp.ClientCapabilities
Merged over defaultClientCapabilities() by the client itself, so a host declares only what it
adds. This is how a host turns on a feature the defaults deliberately leave off —
textDocument.semanticTokens among them, which no server sends without being asked.
clientInfo?
Section titled “clientInfo?”
readonlyoptionalclientInfo?:lsp.InitializeParams["clientInfo"]
Load-bearing rather than cosmetic: at least one real server branches on the client name and withholds a request from clients it does not recognise. The value is the host’s to pick.
initializationOptions
Section titled “initializationOptions”
readonlyinitializationOptions:unknown
notificationHandlers?
Section titled “notificationHandlers?”
readonlyoptionalnotificationHandlers?:Readonly<Record<string,LspNotificationHandler<LspClient>>>
Merged around the connection’s own handlers rather than replacing them. See createClient.
reconnect?
Section titled “reconnect?”
readonlyoptionalreconnect?:LspReconnectOptions
Reconnects a transport that closed or failed on its own. Absent, the first loss is final.
rootUri
Section titled “rootUri”
readonlyrootUri:lsp.DocumentUri|null
serverRequestHandlers?
Section titled “serverRequestHandlers?”
readonlyoptionalserverRequestHandlers?:Readonly<Record<string,LspServerRequestHandler<LspClient>>>
Answers the server’s requests; the connection’s own workspace/diagnostic/refresh stays its.
timeoutMs
Section titled “timeoutMs”
readonlytimeoutMs:number
Methods
Section titled “Methods”createTransport()
Section titled “createTransport()”createTransport():
LspManagedTransport|Promise<LspManagedTransport>
Returns
Section titled “Returns”LspManagedTransport | Promise<LspManagedTransport>