Go语言:修复 vscode 不会自动提示

错误提示:


The gopls server crashed 5 times in the last 3 minutes. The server will not be restarted.

修复方法:


  • 进入 Go for Visual Studio Code 插件的 配置json
{
    "explorer.confirmDelete": false,
    "explorer.confirmDragAndDrop": false,
    "window.zoomLevel": 1,
    "[json]": {
        "editor.defaultFormatter": "vscode.json-language-features"
    },
    "[html]": {
        "editor.defaultFormatter": "lonefy.vscode-JS-CSS-HTML-formatter"
    },
    "[javascript]": {
        "editor.defaultFormatter": "vscode.typescript-language-features"
    },
    "go.useLanguageServer": true,
    "[go]": {},
    "go.lintOnSave": "off",
}
  • "go.useLanguageServer": true 更改为 "go.useLanguageServer": false
  • 重启 vscode 修复

你可能感兴趣的:(Go语言:修复 vscode 不会自动提示)