开发者

How to stop IntelliJ Scala plugin indenting blocks

On IntelliJ 9.0.2 with the latest Scala plugin, the problem is that the code formatter turns this:

  object Test
  {
    def main (args: Array[String])
    {
      if (...)
      {
        ...
      }
    }
  }
开发者_如何学编程

into this:

  object Test
  {
    def main (args: Array[String])
      {
        if (...)
          {
            ...
          }
      }
  }

i.e. it's indenting the blocks, and I've done my best to tell it not to in the preferences.

It's a small thing, but is slowing driving me batty :/


That looks like a bug, I've lodged an issue.

It's more common in Scala code to leave the brace on the previous line. This is formatted correctly by IntelliJ. But to each his own...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜