Skill Development Limited info

clangd-lsp

clangd-lsp is a Claude Code plugin that connects the clangd C/C++ language server to Claude Code. It provides code intelligence, diagnostics, and formatting for C and C++ source and header files.

  • 37.6k GitHub stars
clangd-lsp — illustration

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

  1. Install via Homebrew (macOS)

    Install LLVM with Homebrew, then add its bin directory to your PATH.

    bash
    brew install llvm
    # Add to PATH: export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
  2. Install on Ubuntu/Debian

    Install clangd with apt.

    bash
    sudo apt install clangd
  3. Install on Fedora

    Install the clang-tools-extra package with dnf.

    bash
    sudo dnf install clang-tools-extra
  4. Install on Arch Linux

    Install the clang package with pacman.

    bash
    sudo pacman -S clang
  5. Install on Windows

    Download LLVM from the LLVM releases page (https://github.com/llvm/llvm-project/releases) or install it with winget.

    bash
    winget install LLVM.LLVM

هاد البلجن بيوصل سيرفر اللغة clangd مع Claude Code. بيعطيك ذكاء بالكود وتشخيص للأخطاء وتنسيق لملفات C و C++.