Claude Code LSPs
This repository contains a Claude Code marketplace with plugins that offer LSP servers for TypeScript, Rust, Python, Go, Java, Kotlin, Scala, C/C++, PHP, Ruby, C#, PowerShell, HTML/CSS, LaTeX, Julia, Vue, Svelte, OCaml, BSL (1C:Enterprise), Ada, Dart, Solidity, and Markdown/mdbase. LSP servers provide powerful and familiar code intelligence features to IDEs, and now Claude Code directly.
Claude Code officially supports LSP. In 2.0.74 they officially added it to the changelog. Previously, the new LSP builtin tool had to be enabled manually via $ENABLE_LSP_TOOL=1.
This marketplace currently targets Claude Code 2.1.50+ (latest release: 2.1.52) to use modern LSP configuration fields like startupTimeout.
Claude can use the LSP tool to
- Go to the definition for symbols (
goToDefinition)
- Go to the implementation for symbols (
goToImplementation)
- Hover over symbols (
hover)
- List all the symbols in a file (
documentSymbol)
- Find all references to a symbol (
findReferences)
- Search for symbols across the workspace (
workspaceSymbol)
- Get the call hierarchy for a given function (
prepareCallHierarchy)
- Find all functions that call a given function (
incomingCalls)
- Find all functions/methods called by a given function (
outgoingCalls)
Patching Claude Code
Run npx tweakcc --apply. tweakcc automatically detects your Claude Code installation (npm or native) and applies the necessary patches. It will automatically patch your Claude Code installation to make CC's builtin LSP support usable. (It also does a bunch of other things like let you customize all the system prompt parts, create new CC themes, change the thinking verbs, and a lot more.)
Installing the plugins
Install them the usual way. First make CC aware of the marketplace:
- Run
claude
/plugin marketplace add Piebald-AI/claude-code-lsps
Then enable the plugins of your choice:
- Run
claude
- Type
/plugins
- Tab to
Marketplaces
- Enter the
claude-code-lsps marketplace and choose Browse plugins
- Select the plugins you'd like with the spacebar (e.g. TypeScript, Rust)
- Press "i" to install them
- Restart Claude Code
LSP definition workflow (for contributors)
.lsp.json files are the canonical source of LSP configuration.
.claude-plugin/marketplace.json lspServers entries are generated from .lsp.json.
- Do not hand-edit generated
lspServers blocks.
sync-lsp-to-marketplace only updates plugins that already exist in marketplace plugins[]. Add a marketplace entry first when introducing a new plugin directory.
validate-lsp-definitions will fail if a plugin directory exists but is not referenced in marketplace plugins[].
Run this workflow after any LSP config change:
node scripts/validate-all.mjs
validate-all runs:
sync-lsp-to-marketplace.mjs
validate-lsp-definitions.mjs
validate-runtime-marketplace.mjs
Optional: node scripts/validate-all.mjs --skip-runtime to skip Claude runtime validation.
Language-specific setup instructions
You need to install various components in order for the plugins to use them:
Rust (rust-analyzer)
Uses rust-analyzer, the official modern Rust Language Server and the same one used by the official VS Code extension. If you have rustup, installing rust-analyzer is easy:
rustup component add rust-analyzer
The rust-analyzer executable needs to be in your PATH.