LaunchKit · 2026
Back to Skills

clangd-lsp

C/C++ language server (clangd) providing code intelligence, diagnostics, and formatting for .c, .h, .cpp, .cc.

0
854 downloads
by @bowen31337

Setup & Installation

openclaw skills install @bowen31337/clangd-lsp

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install clangd-lsp

What This Skill Does

C/C++ language server integration using clangd, part of the LLVM project. Provides autocomplete, go-to-definition, find references, real-time diagnostics, and refactoring for C and C++ files. Works with any LSP-compatible editor.

clangd uses the same compiler frontend as Clang, so its diagnostics and code understanding are more accurate than generic IDE plugins that parse code independently.

When to use it

  • Navigating a large C++ codebase with go-to-definition
  • Catching compilation errors in real time while editing
  • Formatting C++ source files with clang-format
  • Renaming a symbol across an entire C project
  • Running static analysis on C++ code before committing

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: set up C++ code intelligence for my cmake project

AGENT
  1. 1Generate compile_commands.json by running cmake with -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
  2. 2Create a .clangd config file in the project root with compiler flags and diagnostic settings
  3. 3Verify clangd picks up the project by checking that go-to-definition resolves across files
  4. 4Run clang-tidy to surface static analysis warnings
  5. 5Run clang-format to auto-format modified source files
OUTPUT

C++ project has full code intelligence with accurate diagnostics, autocomplete, and formatting integrated into the editor

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

clangd installed (via LLVM: brew install llvm, apt install clangd, dnf install clang-tools-extra, or winget install LLVM.LLVM)