I'm using BreakBeforeBraces: Allman
in my .clang-format
file, but braces in control statements (such as if
, for
, while
, ...) are not being put on their own line.
// Currently:
void foo()
{
while(true) {
bar();
}
}
// What I want:
void foo()
{
while(true)
{
bar();
}
}
I've read that you can set nested configuration classes for braces in BraceWrapping
, but I could't figure out the correct YAML syntax (and JSON syntax for the sublime text plugin), and couldn't find any existing example.
Is there any way of doing this?