Force function arguments on individual lines

Viewed 36

I want to format arguments as one per line, e.g. as follows:

cls.def(
    "isHomogeneousElastic",
    &SUB::System::isHomogeneousElastic,
    "isHomogeneousElastic");

However, clang-format wants to format this as:

cls.def(
    "isHomogeneousElastic", &SUB::System::isHomogeneousElastic, "isHomogeneousElastic");

How can I avoid this?


I found this question & answer with the solution of using:

BinPackArguments: false
BinPackParameters: false
ExperimentalAutoDetectBinPacking: false
AllowAllParametersOfDeclarationOnNextLine: false

which works on some parts in my code, but not on this particular example.

0 Answers
Related