Type object
File match .clangd .clangd.yml .clangd.yaml **/clangd/config.yaml
Schema URL https://catalog.lintel.tools/schemas/schemastore/clangd/latest.json
Source https://www.schemastore.org/clangd.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Properties

If object
2 nested properties
PathMatch string | path[]
PathExclude string | path[]
CompileFlags object

Flag lists to be added or removed https://clangd.llvm.org/config.html#compileflags

5 nested properties
Add string | string[]
Remove string | string[]
CompilationDatabase path | enum

A directory to search for compilation database https://clangd.llvm.org/config.html#compilationdatabase

Default: "Ancestors"
Compiler string
Examples: "clang++"
minLength=1
BuiltinHeaders string

Whether Clangd should include its own built-in headers (like stddef.h), or use the system header found from the query driver.

Default: "Clangd"
Values: "Clangd" "QueryDriver"
Index object

Code interpretation outside of the current file

3 nested properties
Background string

Whether to produce a project index from files built in the background https://clangd.llvm.org/config.html#background

Default: "Build"
Values: "Build" "Skip"
External string | object | object
StandardLibrary boolean

Whether to index a standard library https://clangd.llvm.org/config.html#standardlibrary

Default: true
Style object
3 nested properties
FullyQualifiedNamespaces string[]
QuotedHeaders string[]

A list of regexes. Headers whose path matches one of these regexes are inserted using "" syntax https://clangd.llvm.org/config#quotedheaders

AngledHeaders string[]

A list of regexes. Headers whose path matches one of these regexes are inserted using <> syntax. https://clangd.llvm.org/config#angledheaders

Diagnostics object
5 nested properties
Suppress string | string[]

Diagnostic codes that to be suppressed https://clangd.llvm.org/config.html#suppress

ClangTidy object
4 nested properties
Add string | clangTidyCheck | string | clangTidyCheck[]
Remove string | clangTidyCheck | string | clangTidyCheck[]
CheckOptions object
Examples: {"readability-identifier-naming.VariableCase":"CamelCase"}
FastCheckFilter string

Whether to run clang-tidy checks that may slow down clangd. https://clangd.llvm.org/config.html#fastcheckfilter

Default: "Strict"
Values: "Strict" "Loose" "None"
UnusedIncludes string

Whether to enable Include Cleaner's unused includes diagnostics https://clangd.llvm.org/config.html#unusedincludes

Default: "Strict"
Values: "None" "Strict"
Includes object
2 nested properties
IgnoreHeader string[]

A list of regexes. Include Cleaner will not produce diagnostics for headers whose path is a suffix match for any of these https://clangd.llvm.org/config.html#ignoreheader

AnalyzeAngledIncludes boolean

Enables/disables detection of unused angled includes that are not from the Standard Library. Disabled by default to avoid false-positives caused by umbrella headers https://clangd.llvm.org/config.html#analyzeangledincludes

Default: false
MissingIncludes string

Whether to enable Include Cleaner's missing includes diagnostics https://clangd.llvm.org/config.html#missingincludes

Default: "None"
Values: "None" "Strict"
Completion object
5 nested properties
AllScopes boolean

Whether to include suggestions from scopes that are not visible https://clangd.llvm.org/config.html#allscopes

ArgumentLists string

Determines what is inserted in argument list position when completing a call to a function https://clangd.llvm.org/config#argumentlists

Default: "FullPlaceholders"
Values: "None" "OpenDelimiter" "Delimiters" "FullPlaceholders"
HeaderInsertion string

Whether to add #include directives when accepting code completions. Config equivalent of the CLI option --header-insertion.

Default: "IWYU"
Values: "IWYU" "Never"
CodePatterns string

Change how completion will suggest code snippets and code patterns.

Default: "All"
Values: "All" "None"
MacroFilter string

Controls whether exact or fuzzy matching is used to decide which macro symbols to offer during code completion. https://clangd.llvm.org/config.html#macrofilter

Default: "ExactPrefix"
Values: "ExactPrefix" "FuzzyMatch"
InlayHints object
7 nested properties
Enabled boolean

Whether to enable inlay-hints https://clangd.llvm.org/config.html#enabled

ParameterNames boolean

Whether to enable inlay-hints for parameter names in function calls https://clangd.llvm.org/config.html#parameternames

DeducedTypes boolean

Whether to enable inlay-hints for deduced types https://clangd.llvm.org/config.html#deducedtypes

Designators boolean

Whether to enable inlay-hints for designators in aggregate initialization https://clangd.llvm.org/config.html#designators

BlockEnd boolean

A boolean that enables/disables inlay-hints for block end comments https://clangd.llvm.org/config.html#blockend

DefaultArguments boolean

A boolean that enables/disables inlay hints for default arguments https://clangd.llvm.org/config#defaultarguments

TypeNameLimit number

Character limit for type hints. Hints that would be longer are not shown. 0 means no limit. https://clangd.llvm.org/config.html#typenamelimit

min=0
Hover object
2 nested properties
ShowAKA boolean

Whether to display desugared types https://clangd.llvm.org/config.html#showaka

MacroContentsLimit number

Character limit for hovered macro expansions. Expansions that would be longer are not shown. https://clangd.llvm.org/config.html#macrocontentslimit

Default: 2048
SemanticTokens object
2 nested properties
DisabledKinds string[]

Specify semantic token kinds that clangd should not send to client https://clangd.llvm.org/config.html#disabledkinds

DisabledModifiers string[]

Specify semantic token modifiers that clangd should not send to client https://clangd.llvm.org/config.html#disabledmodifiers

Documentation object

Specify server side documentation code comment interpretation. Affects the format of the documentation string sent to the client for hover and code completions. https://clangd.llvm.org/config.html#documentation

1 nested properties
CommentFormat string

Determines the comment format of code documentation. https://clangd.llvm.org/config.html#commentformat

Default: "Plaintext"
Values: "Plaintext" "Markdown" "Doxygen"

Definitions

oneOrMorePath string | path[]
oneOrMoreFlags string | string[]
clangTidyCheck string
oneOrMoreDiagnostics string | clangTidyCheck | string | clangTidyCheck[]