mjbsgll
mjbsgll

Reputation: 732

IntelliJ IDEA Scala - reformat file: put case classes at the beginning

I'm using the shortcut to reformat file my .scala files. After that, the types are at the beginning, then come functions and the case class at the bottom.

I would like to change the order when formatting to have types, case classes and then functions.

I cannot find where should I set this, any ideas?

PS: IntelliJ IDEA Community 2019.2

Upvotes: 1

Views: 79

Answers (1)

Alexis Pavlidis
Alexis Pavlidis

Reputation: 1080

You can change the arrangement rules when formatting from here: Settings/Preferences | Editor | Code Style | Scala and then go to the Arrangement tab.

If you don't see Scala as a language you have to install Scalafmt plugin.

The official documentation from Intellij is here.

Upvotes: 1

Related Questions