From bf7e81682ed47777351eee687da0bc00c8fbaad5 Mon Sep 17 00:00:00 2001 From: Thibault Lemaire Date: Sun, 24 Mar 2024 12:18:12 +0100 Subject: [PATCH] tooling: clangd: Tweak formatting rules --- .clang-format | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.clang-format b/.clang-format index 4ded262..dc9b940 100644 --- a/.clang-format +++ b/.clang-format @@ -3,4 +3,14 @@ Language: Cpp BasedOnStyle: LLVM IndentWidth: 4 ColumnLimit: 120 +# Match existing style in codebase +AlignConsecutiveMacros: true +# Match existing style in codebase +IndentCaseLabels: true +# The pointer is part of the type, not of the variable name. Keep it tacked onto to the type +PointerAlignment: Left +# More consistent when qualifying pointers (int const* const) +QualifierAlignment: Right +# Make ambiguous if continuation less likely (easier to see when it's all on a single line. If it's too long, it probably shouldn't be a one-liner anyway) +AllowShortIfStatementsOnASingleLine: AllIfsAndElse ...