Can't change indentation

Hi,


I'm liking the Scala plugin, except for one annoying thing - on my system it is always indents by two characters when I press enter, regardless of what indentation settings I use. Eg, if I type:


class Foo {<enter>
  <-- just two spaces added here


If I use Code->Reformat Code, my indentation settings are completely honoured. But when typing, I always get a two space indent after hitting enter. Is there something I'm missing?

0

Just small offtopic: 2 spaces indentation is a standard de facto for Scala code.

0

Look at:
File -> Settings -> Code Style -> General -> Scala -> Indent
Other formatter settings you can see in section:
File -> Settings -> Code Style -> Scala
Also there are very useful autoimport settings.

0

Sorry, I should have mentioned that I've already tried changing all the indentation settings under Code Style -> General -> Scala. I've tried various values and they are always honoured if I use Code -> Reformat Code, but when I press enter I get two character indents no matter what.

0

Ok, thank you, that's right. I've already fixed this. Please wait for new releases.

0

Also see bug SCL-540 (http://www.jetbrains.net/jira/browse/SCL-540) which is about this problem.

Should we create calls for bugs? Or are you still in an too-early development stage?

kind regards,

Messi

0

Hi

Of course, any feedback will be appreciated.

With best regards,
Ilya

0

I can find no settings for indentation and I'm getting two-column tabs, which is completely unacceptable to me (and I don't care about anybody else's coding standards).

Info:

IDEA: 8.1 #9732
Scala plug-in: 0.2.22753
JDK: Sun 1.6.0 u12
OS: x86 Linux.


Randall Schulz

0

I found it: It's in the Scala tab of the General section of Code Style.

For some reason when I enter "scala" into the search field in the Settings dialog, this is not listed.


Randall Schulz

0

Randall,

It seems to be an internal IDEA's cosmetic problem. This settings may be found by "indent..." search string typed in appropriate field.

With best regards,
Ilya

0

请先登录再写评论。