Skip to content

LspConnectionProvider

LspConnectionProvider = object

Supplies connections that outlive one view, so a file switch does not pay a handshake and an initialize round trip. options is the connection the plugin would have built: build from it on a new key, ignore it on a known one.

callbacks.onConnected must never fire synchronously from acquire — the caller is mid-construction. Replay it on a microtask.

acquire(options, callbacks): LspConnectionLease

LspConnectionOptions

LspConnectionCallbacks

LspConnectionLease