dfmt icon indicating copy to clipboard operation
dfmt copied to clipboard

Fine grained brace configuration

Open rtbo opened this issue 6 years ago • 1 comments

Could we have the possibility to configure brace style at different levels? What I would like for myself is to put braces on new line everywhere but after control statements. For example:

dfmt_brace_style = custom
dfmt_brace_wrap_after_class = true
dfmt_brace_wrap_after_enum = true
dfmt_brace_wrap_after_struct = true
dfmt_brace_wrap_after_enum = true
dfmt_brace_wrap_after_function = true
dfmt_brace_wrap_after_ctrl_stmt = false
# ...

The current styles are either break everywhere (allman) or nowhere (otbs, stroustrup).

rtbo avatar Aug 13 '19 20:08 rtbo

I don't think that's a good idea, it looks to much like it's going to spiral out of control and end up in uncrustify

UplinkCoder avatar Aug 14 '19 06:08 UplinkCoder