skills/lspeasy-server/SKILL.md
Documentation site for lspeasy Use when: The client sets `partialResultToken` in the request params and you want to....
npx skillsauth add pradeepmouli/lspeasy lspeasy-serverInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Documentation site for lspeasy
Use @lspeasy/server when you need to build the provider side of the
Language Server Protocol — a daemon that editors and language-client tooling
connect to in order to get diagnostics, completions, hover, go-to-definition,
and other language intelligence features.
The primary entry point is LSPServer. Construct it with
ServerOptions, call registerCapabilities(caps) to declare what
the server supports, register handlers with onRequest / onNotification,
then call listen(transport) to accept the first client connection.
Stdio (StdioTransport from @lspeasy/core/node)
— Use when: the client spawns your server as a child process (the canonical
VS Code extension pattern). No network, no port management. Failure mode:
ConsoleLogger writes to stdout and corrupts the LSP stream — always use
NullLogger or a file-based logger with stdio.
WebSocket (WebSocketTransport from @lspeasy/core)
— Use when: multiple clients connect over a network, or the server must be
browser-accessible. Each accepted WebSocket connection needs its own
LSPServer instance. Failure mode: one client crash should not affect
others — wrap each wss.on('connection') callback in try/catch and
create a fresh LSPServer per socket.
TCP (TcpTransport from @lspeasy/core/node)
— Use when: building a persistent local daemon (e.g. a formatting server
shared across editor sessions). Failure mode: client disconnect fires
close() on the server instance — use mode: 'server' and create a new
LSPServer on each reconnect.
DedicatedWorkerTransport (DedicatedWorkerTransport from @lspeasy/core)
— Use when: running the server logic in a Web Worker for in-process browser
isolation. Zero serialization overhead. Failure mode: worker crash is
silent from the server side — monitor the worker's onerror in the host.
After registerCapabilities({ hoverProvider: true }), TypeScript exposes
server.textDocument.onHover(handler) — methods that are absent unless the
corresponding capability is declared. This prevents accidentally registering
handlers for capabilities the server never advertised.
token.isCancellationRequested for early exit.server.onError().Use this skill when:
partialResultToken in the request params and you want to stream intermediate results (e.g. symbols found so far) rather than waiting for the complete set. → use PartialResultSenderMethodNotFound when a capability was not declared, or InvalidParams when schema validation fails). → use ResponseErrorDo NOT use when:
Error and handle it via server.onError() instead.API surface: 4 classes, 27 types, 1 enums, 2 constants
dispatch before calling setClientCapabilities if your handler reads context.clientCapabilities — the value will be undefined until the initialize request is processed.send after the handler has already returned a response — the $/progress notification will arrive after the client has closed the partial-result channel, and the client will silently discard or error on it.partialResultToken — the client has no way to correlate the $/progress notification to the pending request.ResponseError with a code outside the defined ranges without documenting it. Undocumented codes are opaque to clients and tools.ConsoleLogger in a stdio LSP server (StdioTransport) — the LSP base protocol uses stdout as the message channel. Any console.log / console.info / console.debug output will corrupt the stdio stream. Use NullLogger or a file-based logger instead, and send diagnostic messages via window/logMessage notifications.ServerOptions — Configuration for an LSPServer instance. (10 options — see references/config.md)
Key classes: MessageDispatcher (Routes incoming JSON-RPC requests and notifications to their registered handlers), PartialResultSender (Emits typed $/progress partial-result batches from server-side request handlers), ResponseError (An Error subclass that maps to a JSON-RPC 2), ConsoleLogger (Logger implementation that writes to the process console with level filtering)
34 exports total — see references/ for full API.
Load these on demand — do NOT read all at once:
references/classes.md for properties, methods, and inheritancereferences/types.mdreferences/variables.mdreferences/config.md for all settings and defaultstools
`@lspeasy/cli` — programmatic entry point. Exposes the reusable refactor internals (session pipeline + WorkspaceEdit applier) so the same machinery can be embedded in scripts, not just invoked through the `lspeasy` bin. Also: lsp, language-server-protocol, refactor, rename, codemod, move-symbol, cli.
tools
API reference for cli
tools
Use for ANY rename, file-move, or move-symbol refactor — especially rename-heavy work across multiple files. Claude Code's built-in LSP tool is READ-ONLY (find references, but no rename / file-move / move-symbol). Hand-editing those refactors silently misses re-exports, aliased imports, type-only imports, and {@link} doc references. This skill drives a real language server via the `lspeasy` CLI to apply a correct WorkspaceEdit that catches every reference. Trigger when the user asks to rename a function/class/variable/type project-wide, move a file and fix its importers, or pull a symbol out into another module.
tools
Use when working with lspeasy (client, core, server).