uncrustify / uncrustify

Code beautifier
http://uncrustify.sourceforge.net/
GNU General Public License v2.0
2.87k stars 566 forks source link

[Feature Request] Prevent additional indentation of lambda body in initialization statements. #4393

Open 1143910315 opened 1 week ago

1143910315 commented 1 week ago

debug code Expect code Lang: C++ Version: Uncrustify-0.79.0_f I hope that the content of the lambda function body is not indented. After my testing, changing the option indent_off_after_assign from false to true achieves the desired effect, but I want to avoid additional indentation for lambda while keeping it false. The possible reason is that the lines following the equal sign are treated as new lines, hence adding extra indentation. In reality, the lambda itself also causes an indentation.

1143910315 commented 1 week ago

I think that when a lambda expression follows an "=", it should be considered as "same line". Additional indentation should only be applied when the lambda expression is on the line below the "=" sign.