groovy-emacs-modes icon indicating copy to clipboard operation
groovy-emacs-modes copied to clipboard

Indentation of nested map arguments without leading bracket

Open djlindstr opened this issue 6 years ago • 0 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.

djlindstr avatar Aug 28 '18 14:08 djlindstr