Wrap long lines using golines
sjackman opened this issue · comments
Is your feature request related to a problem? Please describe.
I'd like to wrap long lines.
Describe the solution you'd like
I'd like to wrap long lines using golines
when I save a file.
Describe alternatives you've considered
- Configure
pre-commit
to rungolines
(see https://github.com/segmentio/golines/blob/master/.pre-commit-hooks.yaml) - Configure
emeraldwalk.runonsave
to rungolines
(see #847 (comment))
Additional context
On 2021-04-09 in #847 (comment), @stamblerre wrote…
You can now setting
"go.formatTool": "golines"
and it will work together withgopls
. Closing.
but when I set this configuration option go.formatTool": "golines
, I get the error message:
Value is not accepted. Valid values: "default", "gofmt", "goimports", "goformat", "gofumpt", "custom".
"go.formatTool": "custom",
"go.alternateTools": {
"customFormatter": "golines" <--- or exact path like "~/go/bin/golines".
}
}
Nice! Thank you for the quick and helpful response, @hyangah! 😁