user438454534
user438454534

Reputation: 3689

How to disable Intellij wrapping on @ in match statements in Scala?

Intellij formats the following match statement

case product @ Product(id, name) =>
   ....

to

 case product@Product(id, name) =>
    ....

How do I disable the wrapping ? The wrapping makes it harder to read the code where are too many cases.

Upvotes: 0

Views: 34

Answers (1)

David Frank
David Frank

Reputation: 6092

I am assuming, you are using IDEA 15.

  1. Go to Preferences
  2. In the left panel, select Editor > Code Style > Scala
  3. Select the 'Spaces' tab
  4. Scroll down in the checkbox list
  5. Check Spaces around '@' in pattern bindings

enter image description here

Upvotes: 1

Related Questions