scala-style-guide icon indicating copy to clipboard operation
scala-style-guide copied to clipboard

Is there any editorconf settings for the IDEs?

Open shadow-fox opened this issue 9 years ago • 12 comments

Most of the settings like indentation, method naming and all can we put together in a editorconf file so that everyone can use that, if possible ?

shadow-fox avatar Jun 15 '15 08:06 shadow-fox

:+1:

mariussoutier avatar Nov 10 '15 08:11 mariussoutier

:+1:

MarkRBM avatar Nov 16 '15 20:11 MarkRBM

I need

jacksu avatar Nov 17 '15 03:11 jacksu

I think we should provide this too. Will look into it.

rxin avatar Nov 18 '15 05:11 rxin

:+1: IntelliJ - was going to do this meself

pcleary00 avatar Mar 09 '16 13:03 pcleary00

@pcleary00 if you do create one, please submit a pull request here too. Thanks!

rxin avatar Mar 09 '16 18:03 rxin

Please share style configs for IntelliJ

tovbinm avatar Mar 25 '16 21:03 tovbinm

@pcleary00 please share style configs

jacksu avatar Apr 17 '16 03:04 jacksu

Any update?

civitaspo avatar Nov 29 '17 06:11 civitaspo

👍

goungoun avatar Feb 22 '18 12:02 goungoun

Sorry everyone, have not been updating any status here. Kinda sad but I haven't done anything here. I found scalafmt and kinda just ran with it.

pauljamescleary avatar Feb 22 '18 20:02 pauljamescleary

For IntelliJ, here's a couple of settings that I've manually set for my Databricks-styled Scala projects:

To prevent IntelliJ from vertically-aligning wrapped method parameter lists, uncheck the "Align when multiline" option for "method declaration parameters" in the Scala code style configuration:

image

To fix comment formatting to use Javadoc-style formats instead of Scaladoc, uncheck the "Use scaladoc indent for leading asterisk" option in the ScalaDoc settings:

image

For imports: IntelliJ's configuration mechanism can't perfectly capture our import ordering convention (it sometimes gets confused by sorting within certain import groups), but it's possible to get close such that automatic imports don't continually break the code style.

For Scala, use the following configuration:

image

For Java:

image

JoshRosen avatar Feb 22 '18 21:02 JoshRosen