Skip to content

Conversation

@cantgetin
Copy link

Problem

The current formatter always breaks function arguments onto new lines when a call/function signature exceeds the max line length. This results in code formatted like this:

myFunction(
    arg1,
    arg2,
    arg3,
    arg4,
)

While this is clear, it can be excessively verbose for functions with many simple, short arguments, consuming significant vertical screen space and reducing code density.

Solution

This PR introduces a new command-line flag, --compact-function-args (default: false), which gives developers control over this formatting strategy.

When enabled, the formatter will keep function arguments on the same line, only adding new line before the first and after the last argument.

myFunction(
    arg1, arg2, arg3, arg4,
)

I hope my idea is clear. I am open to any feedback or required modifications for this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant