How do I increase the length of a line at which gopls will split function into multiple lines? I've disabled go language server and it stopped splitting the line so gopls is the cause and I'm hoping there is setting somewhere to change the default.
For example this code:
func A() { return /* this code will wrap if you paste this into vs code <...........................> */ }
func B() { return /* this code will not wrap if you paste this into vs code <......................> */ }
will get split like this:
func A() {
return /* this code will wrap if you paste this into vs code <...........................> */
}
func B() { return /* this code will not wrap if you paste this into vs code <......................> */ }
I don't do Go development, so I might be wrong, but looking at the gopls docs, the only formatting settings are
localandgofumpt, andgo.formatFlagsandgo.formatTool. Andgo.formatFlagsis only relevant when not using the language server for formatting.So I think you'd need to use some other formatting option (
go.formatTool) to have more control over how formatting works.Though again, I'm no Go dev, so take what I say with a grain of salt. I'd be happy to be wrong.