-
Notifications
You must be signed in to change notification settings - Fork 285
Closed
Description
Configuration (required)
See https://github.com/mtomko/scalafmt-repro2
Please paste the contents of your .scalafmt.conf
file here:
version=3.8.0
runner.dialect = scala3
rewrite.scala3.removeOptionalBraces = true
Command-line parameters (required)
When I run scalafmt via CLI like this: scalafmt
Steps
Given code like this:
ThisBuild / scalaVersion := "3.3.1"
lazy val versions = new {
val cats = "2.10.0"
}
libraryDependencies += "org.typelevel" %% "cats-core" % versions.cats
Problem
Scalafmt formats code like this:
ThisBuild / scalaVersion := "3.3.1"
lazy val versions = new:
val cats = "2.10.0"
libraryDependencies += "org.typelevel" %% "cats-core" % versions.cats
Expectation
I would like the formatted output to look like this:
ThisBuild / scalaVersion := "3.3.1"
lazy val versions = new {
val cats = "2.10.0"
}
libraryDependencies += "org.typelevel" %% "cats-core" % versions.cats
Notes
Briefly discussed on discord: https://discord.com/channels/632642981228314653/632665341864181780/1209538770303721533
Metadata
Metadata
Assignees
Labels
No labels