-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With newlines.source = keep
linebreaks are not preserved in lists with non-numeric entries
#3894
Comments
this type of formatting is called binpacking, and there's a separate parameter for that. source=keep doesn't guarantee all breaks will be preserved, only when it doesn't contradict other parameters or other constraints. |
Good to know, but even with I have tried following:
No matter what I have tried, I am unable to preserve my newlines in such lists. I can use |
Configuration (required)
Command-line parameters (required)
When I run scalafmt via CLI like this:
scalafmt
Steps
Given code like this:
Problem
Scalafmt formats code like this:
Expectation
I would like the formatted output to look like this:
Notes
When all values are numeric literals. it works fine. As soon as any single value is anything else, line-breaks are inserted.
The text was updated successfully, but these errors were encountered: