What it is
clangd-lsp is a plugin from the official Claude Code plugins repository. It wires the clangd language server into Claude Code so that C and C++ code gets language-server features. The README lists three: code intelligence, diagnostics, and formatting.
The plugin works on these file extensions: .c, .h, .cpp, .cc, .cxx, .hpp, .hxx, .C, and .H. That covers C sources, C++ sources, and their header files, including the uppercase .C and .H variants.
The plugin does not include clangd itself. You need to install clangd on your system first. The README gives install instructions for macOS (Homebrew), several Linux distributions, and Windows. It also links to the clangd website and its Getting Started guide.
Who it's for
- C and C++ developers using Claude Code
- Developers who want language-server code intelligence, diagnostics, and formatting for C/C++ files in Claude Code
Requirements
Requirements
- The clangd language server installed and available on your system
- macOS: LLVM via Homebrew, with its bin directory added to PATH
- Linux: the clangd package (Ubuntu/Debian), clang-tools-extra (Fedora), or clang (Arch Linux)
- Windows: LLVM from the LLVM releases page or via winget
Setup
Install via Homebrew (macOS)
Install LLVM with Homebrew, then add its bin directory to your PATH.
bashbrew install llvm # Add to PATH: export PATH="/opt/homebrew/opt/llvm/bin:$PATH"Install on Ubuntu/Debian
Install clangd with apt.
bashsudo apt install clangdInstall on Fedora
Install the clang-tools-extra package with dnf.
bashsudo dnf install clang-tools-extraInstall on Arch Linux
Install the clang package with pacman.
bashsudo pacman -S clangInstall on Windows
Download LLVM from the LLVM releases page (https://github.com/llvm/llvm-project/releases) or install it with winget.
bashwinget install LLVM.LLVM
هاد البلجن بيوصل سيرفر اللغة clangd مع Claude Code. بيعطيك ذكاء بالكود وتشخيص للأخطاء وتنسيق لملفات C و C++.