You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's pretty common to bind names in lambdas using .map { case (foo, bar) => ..., unfortunately, if the expression is multi-line, we're forced to indent the whole expression because the pattern match is moved to a new line which also introduces an indent.
Sorry about that. I really tried to find a related issue, but I guess I used the wrong keywords.
It was closed as "Won't fix" in 2018 due to the fact that it was probably not worth pursuing with the implementation at the time. Is that still the case today? I know scalafmt went through some refactorings, perhaps this is now more tractable?
It's pretty common to bind names in lambdas using
.map { case (foo, bar) => ...
, unfortunately, if the expression is multi-line, we're forced to indent the whole expression because the pattern match is moved to a new line which also introduces an indent.Steps
Given code like this:
Problem
Scalafmt formats code like this:
Expectation
I would like the formatted output to not be modified in this case.
Notes
This seems like a pretty common pattern in scala codebases and it'd be great if scalafmt could support this?
The text was updated successfully, but these errors were encountered: