Vscode Go mod配置

4,903 阅读1分钟

gopls

为了开启go mod支持,vscode需要使用go的gopls新的工具 github.com/Microsoft/v…

vscode设置

{
    "go.formatTool": "goimports",
    "go.useLanguageServer": true,
    "go.languageServerExperimentalFeatures":{
        "documentLink":false
    }
}

遇到的问题

在没有"documentLink":false的时候,vscode go代码导航的时候会直接打开浏览器当作网页打开, 添加"documentLink":false后正常