Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij Scala multiple import style formatting settings

We have a convention to write

import akka.actor.{ Actor, Props }

instead of

import akk.actor.{Actor, Props}

like Intellij formatting function is doing now. But i didn't find such an option in code style settings, are there any ways to change this bahaviour?

like image 783
4lex1v Avatar asked Mar 15 '13 07:03

4lex1v


People also ask

How do I beautify in IntelliJ?

In the editor, select a code fragment you want to reformat. Before reformatting, you can take a look at the code style settings that are applied to the selected code: press Alt+Enter and click Adjust code style settings. From the main menu, select Code | Reformat Code or press Ctrl+Alt+L .

How do I organize my code in IntelliJ?

Rearrange code Press Ctrl+Alt+S to open the IDE settings and select Editor | Code Style. In the editor, select the code entries you want to rearrange and from the main menu, select Code | Rearrange Code.

How do I import code style into IntelliJ?

Press Ctrl+Alt+S to open the IDE settings and select Editor | Code Style. and select Import Scheme. Then select the necessary format. In the dialog that opens, select the file with the settings and click Open.


2 Answers

I just created an issue for this, I hope it will be implemented soon, it's simple: http://youtrack.jetbrains.com/issue/SCL-5471

like image 135
Alefas Avatar answered Oct 03 '22 15:10

Alefas


Preferences > Code style > Scala > Spaces > ☑ Import braces

like image 44
Sudheer Aedama Avatar answered Oct 03 '22 15:10

Sudheer Aedama