From clangd-lsp
Clangd provides C/C++ code intelligence — diagnostics, go-to-definition, find references, and type information for .c, .h, .cpp, .hpp, and related files.
Ships in clangd-lsp. Installing the plugin adds it to Claude Code.
This LSP server requires clangd to be installed on your system. Make sure it's available in your PATH before enabling.
Copy this JSON into your .lsp.json to enable this server
Add to your .lsp.json or plugin.json:
{
"lspServers": {
"clangd": {
"command": "clangd",
"extensionToLanguage": {
".C": "cpp",
".H": "cpp",
".c": "c",
".h": "c",
".cc": "cpp",
".cpp": "cpp",
".cxx": "cpp",
".hpp": "cpp",
".hxx": "cpp"
},
"args": [
"--background-index"
]
}
}
}File extensions mapped to language identifiers
Server configuration and transport parameters
clangdstdioCommand-line arguments passed to the server process
Initialization options and workspace settings
7-day visitors to each server page
claude plugin install clangd-lsp@claude-plugins-official