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
Originally posted by andrew-selvia September 1, 2023
I've attempted to configure scalafmt to remove all newlines (including, pertinently, the one added between the topmost package statement and the next statement). Sadly, I've come up short. Prior discussion suggests that this is desired broadly. I suspect I'm in the minority.
Nonetheless, I'm curious. Is this already possible? If not, could it be made configurable?
Ideally, this code:
packageorg.scalafmtimportscala.collection.Map
Could be automatically formatted as follows:
packageorg.scalafmtimportscala.collection.Map
The text was updated successfully, but these errors were encountered:
One workaround that can be leveraged is to nest top-level statements:
packageorg.scalafmt:objectA
It's not ideal, but it does work.
andrew-selvia
changed the title
Enable removal of newline following topmost package statement
Enable removal of blank line following topmost package statement
Sep 2, 2023
Discussed in #3629
Originally posted by andrew-selvia September 1, 2023
I've attempted to configure scalafmt to remove all newlines (including, pertinently, the one added between the topmost package statement and the next statement). Sadly, I've come up short. Prior discussion suggests that this is desired broadly. I suspect I'm in the minority.
Nonetheless, I'm curious. Is this already possible? If not, could it be made configurable?
Ideally, this code:
Could be automatically formatted as follows:
The text was updated successfully, but these errors were encountered: