clang-format function argument indent

Viewed 474

Is there a way to configure clang-format to behave in this way? Notice how each parameter is on its own line and is indented by only 1 level as opposed to aligned with the function name. This is my preferred coding style, but I just can't get clang-format to do this.

int a_very_long_function_name(                                                                        
    int var_a,                                                                      
    double my_b,                                                                      
    char *str                                                                       
) {                                                                             
    int d = 0;
    /* ... */                                                           
    return d;                                                       
}
2 Answers
Related