Skip to content

Add customize option for continuation-indent #132

@djlindstr

Description

@djlindstr

It would be good if "continuation indent" could be customized. If I need to add line breaks in the parameter list, groovy-mode doesn't give me much choice on how to control indentation of the rest of the arguments.

This example is not very nice - the indentation depends on the length of the function name:

fun(arg1: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
    arg2: 234) {
    doThis()
    andThat()
}

The next one is more readable, but the argument list still lines up with the body, and we now need extra rows for the function name and argument list:

fun(
    arg1: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
    arg2: 234
) {
    doThis()
    andThat()
}

I would like to have this option:

fun(arg1: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
        arg2: 234) {
    doThis()
    andThat()
}

This would correspond to (c-set-offset 'arglist-cont-nonempty '++) in cc-mode, but I think that we can come up with a simpler customization option. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions