dominikh / go-mode.el

Emacs mode for the Go programming language
BSD 3-Clause "New" or "Revised" License
1.37k stars 209 forks source link

Continuation lines for function calls get extra indentation #346

Closed evanmoses-okta closed 4 years ago

evanmoses-okta commented 4 years ago

With fluent-style function calls we might have many-line continuations with chained function calls. go-mode is adding an additional indent level after every line.

Go-mode's actual formatting:

func Test() {
    foo := Bar().
        Baz().
                        Quxx().
                                Another()
}

Expected (gofmt):

    foo := Bar().
        Baz().
        Quxx().
        Another()
muirdm commented 4 years ago

Thanks for the report! Can you make sure it's fixed for you by above change?

evanmoses-okta commented 4 years ago

@muirdm it works! Thanks for fixing.