typescript-lsp
Skill331 starsChanged 35 days agoApache-2.0View on GitHub
Use the TypeScript language server (`typescript-language-server`) for precise code intelligence in the `clickhouse-js` repository: go-to-definition, find references, hover (type signatures and JSDoc, including `@deprecated` info), workspace-wide symbol search, completions, and per-file type diagnostics. Prefer this over grep when you need to resolve a symbol's actual definition, find all usages of an exported API, or inspect inferred types across the `packages/*` workspaces. The server is preinstalled as a root devDependency — run the repository `setup` skill (`npm install`) first so `node_modules` is populated. Do NOT use this skill for downstream projects that merely depend on `@clickhouse/client`; it is specific to working inside this repo.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- examples/AGENTS.mdAGENTS.md
- packages/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- skills/clickhouse-js-node-rowbinary/AGENTS.mdAGENTS.md
- fix-release-prSkill
- releaseSkill
- setupSkill
- clickhouse-js-node-codingSkill
- clickhouse-js-node-rowbinarySkill
- clickhouse-js-node-troubleshootingSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 60
If your environment provides built-in LSP/code-intelligence tooling, point it at npx typescript-language-server --stdio with the repo root …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TypeScript Language Server in clickhouse-js
typescript-language-server is declared as a root devDependency, so after
npm install (see the setup skill) it is available via npx and uses the
workspace-local typescript (6.x) compiler, matching CI exactly.
The server (6.x) requires Node.js >= 22.22.2, newer than the repository's
Node 20 minimum; on Node 20 npm install only warns, but the server isn't supported there.
Starting the server
From the repo root:
npx typescript-language-server --stdioIt speaks LSP (JSON-RPC, Content-Length-framed) over stdio. There is no
extra configuration: each packages/* workspace, tests/clickhouse-test-runner,
examples/node, and examples/web has its own tsconfig.json, and the
server picks the nearest one per opened file automatically.
Protocol essentials
- Send
initializewithrootUri/workspaceFolderspointing at the repo root, then theinitializednotification. - Send
textDocument/didOpenwith the full file text for every file you want to query (the server reads dependencies from disk on its own; only files you query positions in need to be opened). - Positions are 0-based (line and character).
Verified capabilities (typescript-language-server 5.x, TS 6.x)
| Request | Notes |
textDocument/hover | Returns the full inferred signature + JSDoc markdown |
textDocument/definition | Resolves across workspace packages via source, not dist/ |
textDocument/references | Within the opened file's project |
workspace/symbol | e.g. query ClickHouseClient finds class + re-exports |
textDocument/completion | Context-aware member completions |
| Diagnostics | Push only (textDocument/publishDiagnostics notifications, sent ~1–3s after didOpen). The pull textDocument/diagnostic request is not supported (-32601) — wait for the push notification instead. |
Tips
- If your environment provides built-in LSP/code-intelligence tooling, point
it at
npx typescript-language-server --stdiowith the repo root as the workspace folder. - For one-off scripted queries, spawn the server from Node, frame messages
with
Content-Length: <bytes>\r\n\r\n<json>, and match responses byid. - A full workspace typecheck is still
npm run build && npm run typecheck(build first — some workspaces import compileddist/outputs); the LSP is for targeted, interactive queries, not for CI-equivalent validation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

