Enable Language Server Protocol support in Claude Code for 900x faster code navigation (~50ms vs ~45s for text-based search).
goToDefinition- Jump to symbol definitionsfindReferences- Find all usages across codebasehover- Type info and documentationdocumentSymbol- File structure overviewgetDiagnostics- Real-time errors/warnings
Add to your shell profile (~/.zshrc or ~/.bashrc):
export ENABLE_LSP_TOOL=1Then reload: source ~/.zshrc
Choose the languages you need:
# TypeScript/JavaScript (recommended for most projects)
bun add -g @vtsls/language-server typescript
# Or with npm: npm install -g @vtsls/language-server typescript
# Python
bun add -g pyright
# Or: pip install pyright
# Go
go install golang.org/x/tools/gopls@latest
# Rust
rustup component add rust-analyzer
# PHP
bun add -g intelephense
# HTML/CSS/JSON
bun add -g vscode-langservers-extractedIn Claude Code, run:
/plugin marketplace add Piebald-AI/claude-code-lsps
In Claude Code, install plugins for your languages:
/plugin install vtsls@claude-code-lsps # TypeScript/JS
/plugin install pyright@claude-code-lsps # Python
/plugin install gopls@claude-code-lsps # Go
/plugin install rust-analyzer@claude-code-lsps # Rust
/plugin install phpactor@claude-code-lsps # PHP
/plugin install vscode-langservers@claude-code-lsps # HTML/CSS
npx tweakcc --applyRequired for all changes to take effect.
Test your setup by asking Claude Code:
Go to the definition of [function_name]
Expected: Direct file:line navigation instead of text search.
| Problem | Solution |
|---|---|
| "No LSP server available" | Check /plugin shows language installed; restart Claude Code |
| "Executable not found in $PATH" | Verify binary with which vtsls (or your language server) |
| Plugin installed but not working | Clear cache: rm -rf ~/.claude/plugins/cache and reinstall |
- Piebald-AI/claude-code-lsps - Plugin marketplace
- Claude Code LSP Guide - Detailed walkthrough
- ktnyt/cclsp - Alternative MCP-based LSP
Created by Claude Code with SuperClaude