Does anyone know how to persuade scala-fmt not to insert a newline before a `.`? I'm getting things like:
scala.util
.Try { ... }
/cc @olafurpg
-
-
Replying to @propensive
Do you have a chain like `util.Try { ... } .map { ... } .filter(...)`? If so, break it down into a sequence of variables. Scalafmt enforces that style on select chains.
1 reply 0 retweets 2 likes -
Replying to @olafurpg
That definitely covers at least some of the cases, and maybe all. Thanks for the tip - I'll make my code a bit less point-free! ;)
1 reply 0 retweets 0 likes -
Replying to @propensive
I admit Scalafmt is sometimes a bit too eager to break into a chain. If you want full control over it you can use https://github.com/scalameta/scalafmt/pull/1037 …
1 reply 0 retweets 2 likes
Replying to @olafurpg
It wasn't so hard for me to add the points, and most cases didn't seem like contrived names. But I've thumbs-upped the PR.
7:49 AM - 9 Nov 2017
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.