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
spaces.afterKeywordBeforeParen does not appear to be honoured for the extension soft keyword at all (whether set to true or false). Instead, it seems that a space is inserted between the extension and the following opening paren only when newlines.beforeOpenParenDefnSite = null. When newlines.beforeOpenParenDefnSite is keep, fold, or unfold, the space is removed.
Note: I always want the space and would thus be happy as long as it is added (or preserved), irrespective of the spaces.afterKeywordBeforeParen setting. At first glance, however, it seems reasonable that the behaviour should follow that setting.
The text was updated successfully, but these errors were encountered:
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
spaces.afterKeywordBeforeParen
does not appear to be honoured for theextension
soft keyword at all (whether set totrue
orfalse
). Instead, it seems that a space is inserted between theextension
and the following opening paren only whennewlines.beforeOpenParenDefnSite = null
. Whennewlines.beforeOpenParenDefnSite
iskeep
,fold
, orunfold
, the space is removed.Note: I always want the space and would thus be happy as long as it is added (or preserved), irrespective of the
spaces.afterKeywordBeforeParen
setting. At first glance, however, it seems reasonable that the behaviour should follow that setting.The text was updated successfully, but these errors were encountered: