How can I make golint run on VS Code on type instead of on save?
This side of Go makes me crazy...
So, I've found an option called "go.useLanguageServer" (most likely I had found it some-when earlier, but for some reason it's not so easy to find that option anyway).
"go.useLanguageServer": true,
Also, there're these options:
"go.languageServerExperimentalFeatures": {
"diagnostics": true,
"documentLink": true
},
"go.liveErrors": {
"enabled": true,
"delay": 500,
},
It seems like it's not possible at all.
The only available configs regarding golint are:
// Run Lint tool on save.
"go.lintOnSave": true,
// Specifies Lint tool name.
"go.lintTool": "golint",
// Flags to pass to Lint tool (e.g. ["-min_confidence=.8"])
"go.lintFlags": [],
Maybe you can hack this by changing these options though:
// Controls auto save of dirty files. Accepted values: "off", "afterDelay", "onFocusChange" (editor loses focus), "onWindowChange" (window loses focus). If set to "afterDelay", you can configure the delay in "files.autoSaveDelay".
"files.autoSave": "off",
// Controls the delay in ms after which a dirty file is saved automatically. Only applies when "files.autoSave" is set to "afterDelay"
"files.autoSaveDelay": 1000,
You could set files.autoSave
to afterDelay
and a lower files.autoSaveDelay
.