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
Since extension (s: String) easily fits on a single line, it should not be wrapped on to two lines even with newlines.beforeOpenParenDefnSite = unfold.
If the doc comment /** ... */ is removed from before the def foo(), the formatting works as expected (except that there is no space after the extension keyword, but that may be configurable).
The text was updated successfully, but these errors were encountered:
Given that spaces.afterKeywordBeforeParen defaults to true, I am also not sure why (in the absence of the doc comment) the extension line is formatted to extension(ef: EffectMsg) rather than extension (ef: EffectMsg) using the above .scalafmt.conf. Am I misunderstanding something there?
Given that spaces.afterKeywordBeforeParen defaults to true, I am also not sure why (in the absence of the doc comment) the extension line is formatted to extension(ef: EffectMsg) rather than extension (ef: EffectMsg) using the above .scalafmt.conf. Am I misunderstanding something there?
Configuration (required)
.scalafmt.conf
:Command-line parameters (required)
When I run scalafmt via CLI like this:
scalafmt test.scala
Steps
Given code like this:
Problem
Scalafmt formats code like this:
Expectation
I should like the formatted output to look like this:
Workaround
n/a
Notes
Since
extension (s: String)
easily fits on a single line, it should not be wrapped on to two lines even withnewlines.beforeOpenParenDefnSite = unfold
.If the doc comment
/** ... */
is removed from before thedef foo()
, the formatting works as expected (except that there is no space after theextension
keyword, but that may be configurable).The text was updated successfully, but these errors were encountered: