### Check out Piebald We've released **Piebald**, the ultimate agentic AI developer experience. \ Download it and try it out for free! **https://piebald.ai/** Join our Discord X [**Scroll down for Claude Code LSPs.**](#claude-code-lsps) :point_down:
hero
# Claude Code LSPs This repository contains a [Claude Code marketplace](https://code.claude.com/docs/en/plugin-marketplaces) 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, Elixir, Bash, and Markdown/mdbase. [LSP servers](https://microsoft.github.io/language-server-protocol) provide powerful and familiar code intelligence features to IDEs, and now Claude Code directly. [**Claude Code officially supports LSP.**](https://www.reddit.com/r/ClaudeAI/comments/1otdfo9/lsp_is_coming_to_claude_code_and_you_can_try_it) In 2.0.74 they officially added it to the [changelog](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#2074). 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](https://github.com/Piebald-AI/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: 1. Run `claude` 2. `/plugin marketplace add Piebald-AI/claude-code-lsps` Then enable the plugins of your choice: 1. Run `claude` 2. Type `/plugins` 3. Tab to `Marketplaces` 4. Enter the `claude-code-lsps` marketplace and choose `Browse plugins` 5. Select the plugins you'd like with the spacebar (e.g. TypeScript, Rust) 6. Press "i" to install them 7. 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: ```bash 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: ```bash rustup component add rust-analyzer ``` The `rust-analyzer` executable needs to be in your PATH.
JavaScript/TypeScript (typescript-language-server) Install **typescript-language-server** and `typescript` packages globally: ```bash # npm npm install -g typescript-language-server typescript # pnpm pnpm install -g typescript-language-server typescript # bun bun install -g typescript-language-server typescript ``` Make sure the `typescript-language-server` executable is in your PATH. > **Note:** Install only `vtsls` or `typescript-language-server` since they both cover the same languages.
JavaScript/TypeScript (vtsls) Install **vtsls** and `typescript` packages globally: ```bash # npm npm install -g @vtsls/language-server typescript # pnpm pnpm install -g @vtsls/language-server typescript # bun bun install -g @vtsls/language-server typescript ``` Make sure the `vtsls` executable is in your PATH. > **Note:** Install only `vtsls` or `typescript-language-server` since they both cover the same languages.
Python (pyright) Install **pyright** for its speed and excellent type checking: ```bash # npm npm install -g pyright # pnpm pnpm install -g pyright # bun bun install -g pyright ```
Python (ty) Install **ty**, Astral's extremely fast Python type checker: ```bash # uv (recommended) uv tool install ty # pip pip install ty ``` Make sure the `ty` executable is in your PATH. `ty` auto-detects `pyproject.toml` for project configuration.
Go (gopls) Install **gopls**, the official Go language server: ```bash go install golang.org/x/tools/gopls@latest ``` Make sure your Go bin directory is in your PATH (usually `~/go/bin`).
Java (jdtls) Install **Eclipse JDT Language Server** (jdtls). Requires Java 21+ runtime: ```bash # Download from official sources # Latest snapshot: curl -LO http://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz mkdir -p ~/jdtls tar -xzf jdt-language-server-latest.tar.gz -C ~/jdtls # Or install via package manager (varies by OS) # macOS with Homebrew: brew install jdtls ``` Set `JAVA_HOME` environment variable to Java 21+ installation.
Kotlin (kotlin-lsp) Requires **Java 17+**. Install **kotlin-lsp**: ```bash # macOS with Homebrew brew install JetBrains/utils/kotlin-lsp ``` For manual installation, download from [releases](https://github.com/Kotlin/kotlin-lsp/releases) and add to PATH. > **Note:** Currently supports JVM-only Kotlin Gradle projects.
Scala (metals) Requires **Java 11 or 17**. Install **Metals** using [Coursier](https://get-coursier.io/): ```bash # Install Coursier (if not already installed) # macOS with Homebrew: brew install coursier/formulas/coursier # Then bootstrap Metals: coursier bootstrap org.scalameta:metals_2.13:1.6.5 -o metals -f # Move the generated `metals` binary to a directory on your PATH # Or with recommended JVM options: coursier bootstrap \ --java-opt -XX:+UseG1GC \ --java-opt -XX:+UseStringDeduplication \ --java-opt -Xss4m \ --java-opt -Xms100m \ org.scalameta:metals_2.13:1.6.5 -o metals -f ``` Ensure `metals` is on your PATH and `JAVA_HOME` points to a Java 11 or 17 installation. > **Supported build tools:** sbt, Gradle, Maven, Mill (via Bloop/BSP).
C/C++ (clangd) Install **clangd**, the official LLVM-based language server: ```bash # macOS brew install llvm # Ubuntu/Debian sudo apt-get install clangd # Arch Linux sudo pacman -S clang # Or download from LLVM releases # https://github.com/clangd/clangd/releases ```
PHP (phpactor) Install **Phpactor**: ```bash # Using composer (recommended) composer global require --dev phpactor/phpactor # Or using package manager # macOS with Homebrew: brew install phpactor/tap/phpactor ``` Ensure `~/.composer/vendor/bin` (or `~/.config/composer/vendor/bin` on some systems) is in your PATH.
PHP — php-lsp (php-lsp) Install **php-lsp** (requires [Rust](https://rustup.rs)): ```bash cargo install php-lsp ``` The `php-lsp` executable needs to be in your PATH.
Ruby (ruby-lsp) Install **ruby-lsp**: ```bash gem install ruby-lsp ```
Perl (perl-lsp) Install **perl-lsp**. Download a prebuilt binary for your platform (macOS, Linux, Windows) from the [releases page](https://github.com/tree-sitter-perl/perl-tree-sitter-lsp/releases) and put `perl-lsp` on your `PATH`, or build from source with a Rust toolchain: ```bash cargo install perl-lsp ``` Provides type inference without annotations, cross-file navigation, and framework intelligence for Moo/Moose, Mojolicious, and DBIx::Class. See the [project page](https://github.com/tree-sitter-perl/perl-tree-sitter-lsp) for details.
C# (omnisharp) Install **OmniSharp** (requires .NET SDK): ```bash # macOS with Homebrew: brew install omnisharp/omnisharp-roslyn/omnisharp-mono # Or download from releases: # https://github.com/OmniSharp/omnisharp-roslyn/releases # Extract and add to PATH, or use the install script: # Linux/macOS: curl -L https://github.com/OmniSharp/omnisharp-roslyn/releases/latest/download/omnisharp-linux-x64-net6.0.tar.gz | tar xz -C ~/.local/bin # Ensure the OmniSharp executable is in your PATH ```
PowerShell (powershell-editor-services) Requires **PowerShell 7+** (`pwsh`) installed and available in PATH. ```bash # Windows (winget) winget install Microsoft.PowerShell # macOS brew install powershell/tap/powershell # Ubuntu/Debian # See: https://learn.microsoft.com/en-us/powershell/scripting/install/install-ubuntu ``` The **PowerShellEditorServices** module is not installed automatically at runtime. Install it manually: ```powershell Install-Module -Name PowerShellEditorServices -Scope CurrentUser ```
HTML/CSS/ESLint (vscode-langservers) Install **@zed-industries/vscode-langservers-extracted** for HTML, CSS, and ESLint: ```bash # npm npm install -g @zed-industries/vscode-langservers-extracted # pnpm pnpm install -g @zed-industries/vscode-langservers-extracted # bun bun install -g @zed-industries/vscode-langservers-extracted ``` This provides `vscode-html-language-server`, `vscode-css-language-server`, and `vscode-eslint-language-server` executables. The ESLint language server requires ESLint to be installed in your project: ```bash npm install --save-dev eslint ```
LaTeX (texlab) Install **texlab**, a cross-platform LSP implementation for LaTeX: ```bash # Cargo cargo install --locked texlab # macOS brew install texlab # Arch Linux pacman -S texlab # Windows scoop install texlab # or choco install texlab ``` The `texlab` executable needs to be in your PATH. Supports `.tex`, `.bib`, `.cls`, and `.sty` files.
Julia (julia-lsp) Install **LanguageServer.jl** in Julia: ```julia using Pkg Pkg.add("LanguageServer") Pkg.add("SymbolServer") ``` Make sure `julia` is in your PATH. The language server will automatically detect your Julia project environment based on `Project.toml`. > **Note:** The language server may take some time to start on first use while it precompiles. Subsequent starts will be faster, especially with Julia 1.9+.
Vue (vue-volar) Install **@vue/language-server** (v2.x) globally for Vue.js Single File Component support: ```bash # npm npm install -g @vue/language-server@2 # pnpm pnpm install -g @vue/language-server@2 # bun bun install -g @vue/language-server@2 ``` > **Important:** Version 2.x is required. Version 3.x removed the internal TypeScript communication layer and requires the LSP client to implement custom request forwarding (`tsserver/request` → `tsserver/response`) between Vue and TypeScript language servers. Claude Code's simple LSP integration does not support this mechanism. See [v3 upgrade guide](https://github.com/vuejs/language-tools/discussions/5456) for details. The plugin launcher scans `PATH` and picks the newest compatible `vue-language-server` **2.x.x** binary (ignoring `3.x.x`). **Important:** For full functionality, TypeScript must be installed in your project: ```bash npm install --save-dev typescript ``` The language server uses the project's `node_modules/typescript/lib` for type checking. This enables: - Template expression type-checking - Component prop validation - Slot type inference - CSS/SCSS intellisense in `