indent_braces_no_func
Whether to disable indenting function braces if indent_braces=true
.
Possible values are true and false, default false.
Works only if indent_braces is true.
Examples
Config:
indent_braces = true
indent_braces_no_func = true
true
Before:
int main()
{
int x = 10;
int y = 20;
// if with else
if (x<y) {
std::cout << "Also x is less than " << y << '\n';
}
else {
std::cout << "Also x is more (or equal) than " << y << '\n';
}
return 0;
}
code after:
int main()
{
int x = 10;
int y = 20;
// if with else
if (x<y) {
std::cout << "Also x is less than " << y << '\n';
}
else {
std::cout << "Also x is more (or equal) than " << y << '\n';
}
return 0;
}
Note the "main" braces were not indented.
See also
- nl_if_brace: Add or remove newline between 'if' and '{'.
- indent_braces: Whether braces are indented to the body level.
- indent_braces_no_class: Whether to disable indenting class braces if
indent_braces=true
. - indent_braces_no_struct: Whether to disable indenting struct braces if
indent_braces=true
.