scalameta / scalafmt

Code formatter for Scala
http://scalameta.org/scalafmt
Apache License 2.0
1.42k stars 276 forks source link

Whitespace forced after infix method ending with _ #4106

Closed YanDoroshenko closed 1 month ago

YanDoroshenko commented 1 month ago

Configuration (required)

version = 3.8.2
runner.dialect = scala213

Command-line parameters (required)

When I run scalafmt via CLI like this: scalafmt

Steps

Given code like this:

trait Test {
  def `x_`: String
}

Problem

Scalafmt formats code like this:

trait Test {
  def `x_` : String
}

Expectation

I would like the formatted output to look like this:

trait Test {
  def `x_`: String
}