Skip to content

plugin: ship Go/Python/TS language servers in the global plugin#18

Merged
Tanq16 merged 1 commit into
mainfrom
feat/plugin-lsp-servers
Jul 21, 2026
Merged

plugin: ship Go/Python/TS language servers in the global plugin#18
Tanq16 merged 1 commit into
mainfrom
feat/plugin-lsp-servers

Conversation

@Tanq16

@Tanq16 Tanq16 commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Ships gopls, pyright-langserver, and typescript-language-server as part of the global plugin that configure and launch build, so Claude gets go-to-definition, find-references, workspace symbol search, and post-edit type diagnostics in every session by default — no -P needed, no build step.

Where it lives

writeGlobalLSP in internal/plugins/plugins.go lays a .lsp.json at the global-plugin root, mirroring writeGlobalManifest:

  • Rewritten every build, not refresh-gated like skills/styles, so an added server or schema change reaches existing installs on the next launch without needing configure.
  • All three shipped unconditionally, no toolchain detection. A server whose binary is absent is skipped by Claude Code and the rest still start, so gating on LookPath would only reimplement platform behavior — and worse, bake toolchain presence in at build time so a later go install/npm install wouldn't take effect until a rebuild.

The repo-root .lsp.json (which briefly shipped LSP via the claudex-dev plugin) is removed — keeping both would self-conflict on file extensions when this repo is loaded via -P alongside the global plugin, and Claude Code resolves that by silently dropping one.

Servers

Language Binary Install
Go gopls go install golang.org/x/tools/gopls@latest
Python pyright-langserver npm install -g pyright
TypeScript / JS typescript-language-server npm install -g typescript-language-server typescript@5

typescript is a second package — the server drives tsserver and ships without it. The @5 pin is load-bearing: typescript@latest is 7.x, which dropped the tsserver binary, and the language server fails initialize outright against it (verified: Could not find a valid TypeScript installation ... Exiting).

Verified

  • .lsp.json schema checked against a claude plugin init --with lsp scaffold on 2.1.209
  • Built the global plugin through the real BuildGlobalPlugin code path with the actual embedded FS; inspected the generated .lsp.json — valid, all three servers, correct extension maps
  • Loaded that generated global dir headless: Loaded 3 LSP server(s) from plugin: claudex
  • End-to-end against gopls earlier in this work: the LSP tool resolved a real symbol to its definition line, confirming the server starts and answers rather than the model guessing
  • go build, go vet, gofmt, and go test ./... all pass; added tests assert the file is written with the three commands and is rewritten even on a no-refresh build

Notes

  • --mcp none does not suppress language servers (LSP is not MCP); claude --bare is the escape hatch. README says so.
  • Manifest description updated to name language servers alongside skills and output styles.
  • [no ci] is in the title and commits. This is now Go code shipping to every session — if you want a release cut for it, drop [no ci] (and consider [minor-release]) at merge, since make version reads the merge-commit subject.

🤖 Generated with Claude Code

@Tanq16 Tanq16 changed the title plugin: ship Go, Python, and TypeScript language servers [no ci] plugin: ship Go/Python/TS language servers in the global default plugin [no ci] Jul 21, 2026
Adds a .lsp.json to the global plugin that configure and launch build, so
Claude gets go-to-definition, find-references, and post-edit type
diagnostics in every session by default — no build step, no -P.

writeGlobalLSP mirrors writeGlobalManifest: a fixed JSON file at the
plugin root, rewritten every build (not refresh-gated like skills and
styles) so an added server or schema change reaches existing installs.
All three ship unconditionally; Claude Code skips a server whose binary
is absent, so no toolchain detection is needed.

Install: gopls (go install); pyright and typescript-language-server plus
typescript@5 (npm). The @5 pin matters — typescript@latest is 7.x, which
dropped the tsserver binary the language server drives.
@Tanq16
Tanq16 force-pushed the feat/plugin-lsp-servers branch from 5838470 to d4c8a18 Compare July 21, 2026 17:19
@Tanq16 Tanq16 changed the title plugin: ship Go/Python/TS language servers in the global default plugin [no ci] plugin: ship Go/Python/TS language servers in the global plugin [minor-release] Jul 21, 2026
@Tanq16 Tanq16 changed the title plugin: ship Go/Python/TS language servers in the global plugin [minor-release] plugin: ship Go/Python/TS language servers in the global plugin Jul 21, 2026
@Tanq16
Tanq16 merged commit 13b911d into main Jul 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant