如果
"go.useLanguageServer": false
改成:
"go.formatTool": "gofmt"
如果
"go.useLanguageServer": true
vscode添加:
"go.toolsManagement.autoUpdate": true,
"go.formatTool": "gofmt",
"[go]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": false,
}
},
"go.lintOnSave": "off",
"go.useLanguageServer": true,
"go.vetOnSave": "off",