typescript-lsp

Use the TypeScript language server (`typescript-language-server`) for precise code intelligence in the `clickhouse-js` repository: go-to-definition, find…

npx skills add https://github.com/clickhouse/clickhouse-js --skill typescript-lsp

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.

Starting the server

From the repo root:

npx typescript-language-server --stdio

It 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

  1. Send initialize with rootUri/workspaceFolders pointing at the repo root, then the initialized notification.
  2. Send textDocument/didOpen with 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).
  3. Positions are 0-based (line and character).

Verified capabilities (typescript-language-server 5.x, TS 6.x)

RequestNotes
textDocument/hoverReturns the full inferred signature + JSDoc markdown
textDocument/definitionResolves across workspace packages via source, not dist/
textDocument/referencesWithin the opened file's project
workspace/symbole.g. query ClickHouseClient finds class + re-exports
textDocument/completionContext-aware member completions
DiagnosticsPush 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 --stdio with 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 by id.
  • A full workspace typecheck is still npm run build && npm run typecheck (build first — some workspaces import compiled dist/ outputs); the LSP is for targeted, interactive queries, not for CI-equivalent validation.

Mais skills de clickhouse

clickhouse-best-practices
clickhouse
28 regras de melhores práticas do ClickHouse organizadas por design de esquema, otimização de consultas e estratégia de ingestão de dados. Abrange três áreas críticas: seleção de chave primária e tipo de dados (decisões de design imutáveis), otimização de JOIN e consultas, e agrupamento de inserções com prevenção de mutações. Inclui 28 regras priorizadas por impacto, com regras de design de esquema e otimização de consultas marcadas como CRÍTICAS devido ao armazenamento colunar e mecanismos de índice esparso do ClickHouse. Fornece procedimentos de revisão estruturados para...
official
clickhouse-js-node-coding
clickhouse
Write idiomatic application code with the ClickHouse Node.js client (`@clickhouse/client`). Use this skill whenever a user is *building* against the Node.js…
official
clickhousectl-cloud-deploy
clickhouse
Use quando um usuário deseja implantar o ClickHouse na nuvem, ir para produção, usar o ClickHouse Cloud, hospedar um serviço gerenciado do ClickHouse ou migrar de um ambiente local…
official
clickstack-otel-collector
clickhouse
Use when a user wants to wire an OpenTelemetry collector into a Managed ClickStack service on ClickHouse Cloud, either by deploying a new local collector…
official
infra-clickhouse
clickhouse
Sets up and manages ClickHouse using the clickhousectl CLI — installs and runs a local ClickHouse server for development, and creates managed ClickHouse Cloud…
official
infra-postgres
clickhouse
Configura e gerencia o Postgres usando a CLI do clickhousectl — executa um Postgres local com suporte a Docker para desenvolvimento, e cria e opera o ClickHouse gerenciado…
official
clickhouse-best-practices
clickhouse
DEVE SER USADO ao revisar esquemas, consultas ou configurações do ClickHouse. Contém 31 regras que DEVEM ser verificadas antes de fornecer recomendações. Sempre leia…
official
setup
clickhouse
Orienta os usuários na configuração da conexão do servidor ClickHouse MCP incluído neste plugin. Use quando o usuário instalar o plugin pela primeira vez ou tiver problemas…
official