microsoft/vscode-go

Format document no longer working or running go fmt after vs code update

AddictArts opened this issue · 3 comments

go 1.14.2
code 1.44.2
darwin64

Opened a go workspace project and noticed that after changes to a go file there was no longer formatting. I can run go fmt from the command line. This used to word and recent updates must have killed it. Trying to run the format document in vscode has no effect. I have the go tools all installed.

@AddictArts Can you please share the go extension version and your go extension settings? (Those with "go", "[go]", and "gopls" prefixes in settings.json)
Thanks!

@hyangah thanks for asking.
Extension: 0.14.1
settings.json: none // no "[go]"
in workspace settings: "go.useLanguageServer": true

So, I noticed in the status bar clang-format complaining that it couldn't format the doc. Don't know when that happened. I uninstalled the clang-format extension and it now is formatting. My apologies. Grr, don't know why it was trying to format a go source file.

Thanks, this can be closed.

Thanks for following up! Glad it's working again.