C/C++ LSP (clangd)

Plugin

为 Claude Code 接入 C/C++ 语言服务器 clangd,提供代码智能、诊断与格式化。需先安装 LLVM/clangd 并加入 PATH。Anthropic 官方插件。

anthropics/claude-plugins-official · plugins/clangd-lsp48.1k
README

clangd-lsp

C/C++ language server (clangd) for Claude Code, providing code intelligence, diagnostics, and formatting.

Supported Extensions

.c, .h, .cpp, .cc, .cxx, .hpp, .hxx, .C, .H

Installation

Via Homebrew (macOS)

brew install llvm
# Add to PATH: export PATH="/opt/homebrew/opt/llvm/bin:$PATH"

Via package manager (Linux)

# Ubuntu/Debian
sudo apt install clangd

# Fedora
sudo dnf install clang-tools-extra

# Arch Linux
sudo pacman -S clang

Windows

Download from LLVM releases or install via:

winget install LLVM.LLVM

More Information