Indenting/Spaces layout after a label in Intellij with groovy

Bru*_*owe 7 groovy intellij-idea

Intellij Seems to have a default layout like this

def foo(int arg) {
    label1:
    for (i in 1..10) {
        label2:
        foo(i)
    }
}
Run Code Online (Sandbox Code Playgroud)

How do i change it to

def foo(int arg) {
    label1:
        for (i in 1..10) {
            label2:
            foo(i)
        }
}
Run Code Online (Sandbox Code Playgroud)

This is required since we want out test layouts to look like this:

def 'my test'() {
   given:
       ...
   when:
       ...
   then:
       ...
}
Run Code Online (Sandbox Code Playgroud)

ANSWER: As given below in the answer, I can confirm this works in intellij 13

Mar*_*szS 20

Idea Intellij 13+中

Settings -> Editor -> Code Style -> Groovy -> Tabs and Indents

  • 标签缩进: 4

  • 标签缩进样式: Indent statement after label