Need help with clang-format settings in QtCreator
-
I have used Qt Creator many years, with the original built-in formatting options (Preferences->C++->Code style and then Tabs "General" through "Pointers and References", completely disabling clang-format)
Things got buggy, especially with newer language features. So I bit the bullet and tried to put my code style into clang-format rules.
So I went through The Clang format style options from top to bottom (took me a while), and tried to apply each option as best as I could.
Most things seem to work, but I struggle in one particular configuration:
// What I'd like to have: { auto fLambda = []() { return; }; } // What I get: { auto fLambda = []() { return; }; }
This may be related to my switch/case configuration, which is as follows:
{ switch(value) { case 0: { break; } } }
So I cannot just globally make a rule that braces should be indented. I'd like to NOT indent after control statements, but DO intent the body of a lambda.
Any ideas?