how can vscode-go support group import #2004
-
i am using goland and vscode for develop. file watcher of goland support group import for 3 groups: go, third party, own. But when it comes to vscode, i set the format flag as: "-local $local(my own package name)", and use goimports as format tool but it won't work for me, when i format file, the import was sorted by default rule. i am curious. Besides, both able and disable of the language server have no difference |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
What you can do is try to debug why it's happening. Is btw, did you consider alternatives? I am using "go.useLanguageServer": true,
"go.formatTool": "gofumpt",
"go.formatFlags": [],
"gopls": {
"formatting.gofumpt": true,
}, |
Beta Was this translation helpful? Give feedback.
What you can do is try to debug why it's happening. Is
goimports
available from terminal? Can you rungoimports
command and see file changed?btw, did you consider alternatives? I am using
gofumpt
instead ofgoimports
and you can turn its support by providing an appropriate bool flag togopls.gofumpt
setting.