sgon00
sgon00

Reputation: 5777

Realtime errors/warnings without file save in VSCode

VSCode can only report syntax errors/warnings after I save the file for Go. This behavior is different from other languages such as dart. Can I have real time errors/warnings in Go?

Upvotes: 1

Views: 315

Answers (1)

sgon00
sgon00

Reputation: 5777

I found the solution.

Basically adding the following to user settings (settings.json):

"go.liveErrors": {
  "enabled": true,
  "delay": 500
}

VSCode will then ask you to install the gotype-live tool. You can also install manually if you want with the following command:

go get -v github.com/tylerb/gotype-live

Upvotes: 1

Related Questions