A collection of Language Server Protocol (LSP) plugins for Claude Code.
The Language Server Protocol provides IDE-like intelligence to Claude Code. On startup, Claude Code automatically starts LSP servers from installed plugins and exposes them to Claude in two ways:
LSP Tool - A builtin tool with 5 operations mapping directly to LSP commands:
goToDefinition- Jump to where a symbol is definedfindReferences- Find all usages of a symbolhover- Get documentation and type infodocumentSymbol- List all symbols in a fileworkspaceSymbol- Search symbols across the project
Automatic Diagnostics - Real-time error and warning detection similar to the VS Code integration, but operating independently. These diagnostics tend to be faster and more comprehensive than the VS Code equivalent.
| Plugin | Language | LSP |
|---|---|---|
| gopls | Go | gopls |
| vtsls | TypeScript/JavaScript | vtsls |
| pyright | Python | pyright |
| jdtls | Java | jdtls |
| clangd | C/C++ | clangd |
| omnisharp | C# | OmniSharp |
| intelephense | PHP | Intelephense |
| kotlin-language-server | Kotlin | kotlin-language-server |
| rust-analyzer | Rust | rust-analyzer |
| solargraph | Ruby | Solargraph |
| vscode-html-css | HTML/CSS | vscode-langservers |
The LSP tool is not yet enabled by default. Add to your shell profile (.bashrc, .zshrc, etc.):
export ENABLE_LSP_TOOL=1Or run with the environment variable:
ENABLE_LSP_TOOL=1 claudeclaude
/plugin marketplace add boostvolt/claude-code-lspsInstall individual plugins:
/plugin install gopls@claude-code-lsps
/plugin install vtsls@claude-code-lsps
/plugin install pyright@claude-code-lsps
/plugin install jdtls@claude-code-lsps
/plugin install clangd@claude-code-lsps
/plugin install omnisharp@claude-code-lsps
/plugin install intelephense@claude-code-lsps
/plugin install kotlin-language-server@claude-code-lsps
/plugin install rust-analyzer@claude-code-lsps
/plugin install solargraph@claude-code-lsps
/plugin install vscode-html-css@claude-code-lspsOr browse and install interactively:
/pluginEach plugin will attempt to auto-install its LSP server on first use. If auto-install fails, use the manual instructions below.
Go (gopls)
go install golang.org/x/tools/gopls@latestEnsure ~/go/bin is in your PATH.
TypeScript/JavaScript (vtsls)
npm install -g @vtsls/language-server typescriptPython (pyright)
pip install pyrightJava (jdtls)
brew install jdtlsOr download manually from Eclipse JDT Language Server.
Requires Java 21+ runtime.
C/C++ (clangd)
brew install llvmOr via Xcode Command Line Tools:
xcode-select --installC# (omnisharp)
brew install omnisharp/omnisharp-roslyn/omnisharp-monoOr via dotnet:
dotnet tool install -g csharp-lsPHP (intelephense)
npm install -g intelephenseKotlin (kotlin-language-server)
brew install kotlin-language-serverRust (rust-analyzer)
brew install rust-analyzerOr via rustup:
rustup component add rust-analyzerRuby (solargraph)
gem install solargraphHTML/CSS (vscode-html-css)
npm install -g vscode-langservers-extractedPlugin Structure
my-lsp/
├── .claude-plugin/
│ └── plugin.json
├── .lsp.json
└── hooks/
├── hooks.json
└── check-my-lsp.sh
.lsp.json Schema
The .lsp.json file configures the language server:
{
"language-id": {
"command": "lsp-server-command",
"args": ["--stdio"],
"extensionToLanguage": {
".ext": "language-id"
},
"transport": "stdio",
"initializationOptions": {},
"settings": {},
"maxRestarts": 3
}
}| Field | Type | Required | Description |
|---|---|---|---|
command |
string | Yes | Command to start the LSP server |
args |
string[] | No | Arguments passed to the command |
extensionToLanguage |
object | Yes | Maps file extensions to language IDs |
transport |
string | No | Communication method: "stdio" (default) or "socket" |
initializationOptions |
object | No | Options passed during LSP initialization |
settings |
object | No | Server-specific settings |
maxRestarts |
number | No | Max restart attempts on crash (default: 3) |
Example: gopls
.lsp.json:
{
"go": {
"command": "gopls",
"args": [],
"extensionToLanguage": {
".go": "go"
},
"transport": "stdio",
"initializationOptions": {},
"settings": {},
"maxRestarts": 3
}
}.claude-plugin/plugin.json:
{
"name": "gopls",
"description": "Go language server",
"version": "1.0.0",
"author": {
"name": "Your Name"
}
}hooks/hooks.json (optional auto-install):
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/check-gopls.sh",
"timeout": 30
}
]
}
]
}
}MIT
