daveoncode
daveoncode

Reputation: 19618

How to force inline Scala self type declaration on code format

How can I configure Intellij IDEA code formatting in order to preserve inline self type declaration?

For instance, this:

trait ColumnTypeMappings { self: HasDatabaseConfigProvider[PostgresProfile] =>
//...

gets formatted as:

trait ColumnTypeMappings {
  self: HasDatabaseConfigProvider[PostgresProfile] =>

while I want to keep the former style.

I've taken a look at Editor > Code Style > Scala, but I can't find a suitable option :P

Upvotes: 1

Views: 62

Answers (1)

Mario Galic
Mario Galic

Reputation: 48430

Try unchecking Place self type on new line under

Preferences | Editor | Code Style | Scala | Wrapping and Braces | Class Definition | Place self type on new line

Upvotes: 2

Related Questions