From debf19a4e596eb9d286086d9fd65095a6885d1e9 Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Thu, 26 Dec 2024 11:29:57 -0600 Subject: [PATCH] Style: Add `.clangd` config --- .clangd | 31 +++++++++++++++++++++++++++++++ .editorconfig | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .clangd diff --git a/.clangd b/.clangd new file mode 100644 index 00000000000..95a1e90766c --- /dev/null +++ b/.clangd @@ -0,0 +1,31 @@ +# https://clangd.llvm.org/config +--- +# Default conditions, apply everywhere. + +Diagnostics: + Includes: + IgnoreHeader: + - core/typedefs\.h # Our "main" header, featuring transitive includes; allow everywhere. + - \.compat\.inc +--- +# Header-specific conditions. + +If: + PathMatch: .*\.(h|hh|hpp|hxx|inc) + +# Exclude certain, noisy warnings that lack full context. Replace with lowered severity if/when +# clangd gets diagnostic severity support. (See: https://github.com/clangd/clangd/issues/1937) +CompileFlags: + Add: + - -Wno-unneeded-internal-declaration + - -Wno-unused-const-variable + - -Wno-unused-function + - -Wno-unused-variable +--- +# Suppress all third-party warnings. + +If: + PathMatch: thirdparty/.* + +Diagnostics: + Suppress: "*" diff --git a/.editorconfig b/.editorconfig index 523ff713072..91784612cf1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -18,7 +18,7 @@ indent_style = space indent_size = 4 # YAML requires indentation with spaces instead of tabs. -[*.{yml,yaml}] +[{*.{yml,yaml},.clang{-format,-tidy,d}}] indent_style = space indent_size = 2