开发者

How to stop IntelliJ Scala plugin indenting blocks

开发者 https://www.devze.com 2023-01-03 20:24 出处:网络
On IntelliJ 9.0.2 with the latest Scala plugin, the problem is that the code formatter turns this: object Test

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

精彩评论

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