Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add customize option for continuation-indent #132

Open
djlindstr opened this issue Nov 10, 2018 · 0 comments
Open

Add customize option for continuation-indent #132

djlindstr opened this issue Nov 10, 2018 · 0 comments

Comments

@djlindstr
Copy link
Collaborator

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. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant