I'm using Vim version 8.1.1401 with go version go1.13.1 linux/amd64. I'm trying to disable gofmt from putting all if statement brackets on a new line, for instance:
if thing { return }
is converted to
if thing {
return
}
The only way I've discovered to disable this is by setting:
let g:go_fmt_autosave = 0
however, this disables gofmt altogether. Can I do this somehow without disabling gofmt altogether?
Funny that you can trick that formatter with comments. Here's an example
Without
//
it'd format it in a single line