Following on from How can I align function parameter names in clang-format?, I'd like to be able to do the opposite. In other words, this:
void ReallyLongFunctionNameWithLotsOfParams(Type param1, Type param2, Type param3,
Type param4, Type param5, Type param6, Type param7, Type param8, Type param9) {
...function body
}
Instead of this:
void ReallyLongFunctionNameWithLotsOfParams(Type param1, Type param2, Type param3,
Type param4, Type param5, Type param6,
Type param7, Type param8, Type param9) {
...function body
}
Is the former possible? The latter looks incredibly ugly to me and simply inversing @AhmedFasih's instructions in his answer to the linked question does nothing, at least not for me:
with BinPackArguments and BinPackParameters both false, and AlignConsecutiveAssignments and AlignConsecutiveDeclarations both set to true (documentation of these parameters).
I'm using VS Code v1.50.1 (system setup), commit d2e414d9e4239a252d1ab117bd7067f125afd80a which uses clang-format v10.0.1.
Update: I just realised my comment was a little harsh, and that I should provide some context here to encourage clicking through to the linked page. Apologies for any offence taken by anyone in this short time. I should also provide my .clang-format
as suggested by sweenish, so here it is:
BasedOnStyle: Google
AccessModifierOffset: -4
AlignConsecutiveDeclarations: false
AllowShortIfStatementsOnASingleLine: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeBraces: Custom
ColumnLimit: 0
IndentCaseLabels: true
IndentWidth: 4
PointerAlignment: Left
TabWidth: 4
UseTab: Always