Use the command link clangd preference page to configure the behaviour of the clangd language server:

lsp clangd prefs

clangd Preference Options
Option Description

Path

The absolute path of the clangd command-line tool.

Enable clang-tidy diagnostics

Enables the ClangTidy C++ linter tool.

Index project code in the background and persist index on disk

Enables building of files in the background to generate a project index.

Completion

The granularity of code completion suggestions.

Pretty-print JSON output

Enables the pretty-printing of JSON output.

Drivers

A comma-separated list of globs for the extraction of system includes.

Additional

Miscellaneous clangd command-line arguments.

For project-specific settings, the page also shows a Compilation database status section. It reports the active source used for compile_commands.json, the resolved file location, and the active build configuration. When automatic detection is not suitable, use the Manual compilation database directory override to point clangd at the directory containing compile_commands.json.

Related concepts: