Intellij has a problem with scalafmt and scala 3

1.3k Views Asked by At

my .scalafmt.conf file content is:

version = 3.5.4

Intellij downloaded scalafmt for this version:

enter image description here

but when I want to format file I have error saying literally nothing:

enter image description here

IntelliJ Version:

IntelliJ IDEA 2022.1.1 (Community Edition)
Build #IC-221.5591.52, built on May 10, 2022

Any ideas how to solve this issue ?

thanks

1

There are 1 best solutions below

0
On BEST ANSWER

You should explicitly specify runner.dialect
In case of Scala 3 add runner.dialect = scala3
See https://scalameta.org/scalafmt/docs/configuration.html#scala-dialects

As for non-descriptive error message see https://youtrack.jetbrains.com/issue/SCL-20123