Skip to content

how can vscode-go support group import #2004

Answered by butuzov
wondar-chan asked this question in Help
Discussion options

You must be logged in to vote

What you can do is try to debug why it's happening. Is goimports available from terminal? Can you run goimports command and see file changed?

btw, did you consider alternatives? I am using gofumpt instead of goimports and you can turn its support by providing an appropriate bool flag to gopls.gofumpt setting.

"go.useLanguageServer": true,
"go.formatTool": "gofumpt",
"go.formatFlags": [],
"gopls": {
	"formatting.gofumpt": true,
},

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@hyangah
Comment options

@wondar-chan
Comment options

Answer selected by wondar-chan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants