Reputation: 636
I have the following .clang-format
settings (among others, but these are the relevant ones AFAIK):
AlignAfterOpenBracket: 'DontAlign'
AllowAllParametersOfDeclarationOnNextLine: 'false'
BinPackArguments: 'false'
BinPackParameters: 'false'
What clang-format
does (and similar for function calls):
void this_is_a_function(int first_param,
int second_param,
int third_param);
What I want it to do:
void this_is_a_function(
int first_param,
int second_param,
int third_param);
I.e., I want to keep all the parameters/arguments left aligned, but I don't want to align everything to the open paren. Is this possible?
Upvotes: 0
Views: 128
Reputation: 636
Not a totally satisfactory answer, but better than nothing: add an empty line comment after the open parenthesis.
void this_is_a_function( //
int first_param,
int second_param,
int third_param);
This forces clang-format to align the first item with the others.
Upvotes: 1