Groovy-Emacs-Modes / groovy-emacs-modes

A groovy major mode, grails minor mode, and a groovy inferior mode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Indentation of nested map arguments without leading bracket

djlindstr opened this issue · comments

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.