3

These are the configs on which I run the vscode and golang:

  • go version go1.14.1 linux/amd64
  • vscode version 1.43.2
  • ms-codego version 0.13.1
  • Linux/amd64

When I want to save a file with go extension it takes a long time on formatting

Saving 'get_ads_for_sites.go': Running 'Go' Formatter ([configure](command:workbench.action.openSettings?%5B%22editor.formatOnSave%22%5D)).)

I try gofmt and goimports and also goreturns all of them have this problem. It sometimes takes about 5 minutes and after that it does not do anything. But when I run the go fmt (for example) for that file in the command line, it prints out the formatted result very soon. It will be ok after a while and then with closing and reopening vscode the problem again raise.

More info

When I open another go project I don't have the same problem. I just have the very problem with the told project. The main difference between these two projects is that in the correct project I am using go-dep and in the wrong project I am using go-mod

Emad Helmi
  • 652
  • 8
  • 25
  • Have you tried updating the go tools from Vscode? – icza Apr 11 '20 at 11:34
  • I've just tried the option to update the Go tools with VSCode by pressing Shift-Cmd-P and selecting Go: Install/Update tools and then select all available choices for updating or installing. But after reloading VsCode the problem remains. @icza – Emad Helmi Apr 11 '20 at 12:20
  • @icza please check new info I added in the question – Emad Helmi Apr 11 '20 at 12:24

0 Answers0