-
Notifications
You must be signed in to change notification settings - Fork 277
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
Wired alignment when chain contains comment / no parenthesis call / with parenthesis call #1334
Comments
I've tried nightly version 1.6.0-RC4. This behavior was the same. |
this problem also happened from my side, if my .scalafmt.conf file has |
Currently, the code doesn't introduce newlines into select chains even if their length exceeds the maximum line length. It also results in missing indent when a comment is in the middle of such a chain. Fix both problems, by allowing a newline if one is present in the input. Fixes scalameta#1334.
@lxohi this was fixed when using |
Steps
Given code like this:
When I run scalafmt like this:
Problem
Scalafmt formats code like this:
Expectation
I would like the formatted output to look like this:
Or like this:
Notes
I found a config key
includeNoParensInSelectChains
in the document may related with this issue.But after I added this key to my conf, intellij IDEA reports:
Meanwhile the
Show original
/Show formatted
button in the document for this config key was not functional either at this time.The text was updated successfully, but these errors were encountered: