Open
Description
I'm trying to set up gci as my formatter for more control over import arrangement. I think I've found the relevant extensions, but I can not get the arguments to work. Here's a configuration example:
{
"go.alternateTools": {
"customFormatter": "gci"
},
"go.formatFlags": [
"print",
"--custom-order",
"--section=standard",
"--section=default",
"--section=blank",
"--section=dot",
"--section=alias",
"--section=localmodule"
],
"[go]": {
"editor.defaultFormatter": "golang.go"
},
"go.formatTool": "custom"
}
Looking at the docs it seems like the args are just ignored:
Flags to pass to format tool (e.g. ["-s"]). Not applicable when using the language server.
I would have more control if I could configure formatting like so:
{
"go.formatTool": {
"command": "gci",
"arguments": [
"print",
"--custom-order",
"--section=standard",
"--section=default",
"--section=blank",
"--section=dot",
"--section=alias",
"--section=localmodule"
],
"passFileOn": "stdin"
}
}