Groovy-Emacs-Modes / groovy-emacs-modes

A groovy major mode, grails minor mode, and a groovy inferior mode.
84 stars 39 forks source link

Indentation of nested map arguments without leading bracket #128

Open djlindstr opened 6 years ago

djlindstr commented 6 years ago

Calling a method which takes a map argument indents correctly with a leading parenthesis:

func (
    a: 'xxx',
    b: [
        indentMe: 123,
    ],
    c: 567
)

If the brackets are left out, the inner map is not indented correctly:

func a: 'xxx',
    b: [
    indentMe: 123,
],
    c: 567

Expected:

func a: 'xxx',
    b: [
        indentMe: 123,
    ],
    c: 567

Edit: leading square bracket is a syntax error. The example still applies with or without regular brackets though.