How to make scalafmt remove space before argument braces

34 views Asked by At

When processing function calls, scalafmt will remove spaces before parentheses around the arguments:

val res = myList.map (myFunction)

becomes

val res = myList.map(myFunction)

But if braces are used rather than parentheses it adds spaces:

val res = myList.map{ case x => myFunction(x) }

becomes

val res = myList.map { case x => myFunction(x) }

Is there a way to have scalafmt remove the space in front of the braces in this case and not add one?

(The spaces inside the braces are good, I just don't want the space before the opening brace)

0

There are 0 answers