本篇内容主要讲解“vscode写go代码怎么配置”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“vscode写go代码怎么配置”吧!
https://github.com/Microsoft/vscode-go/wiki/GOPATH-in-the-VS-Code-Go-extension
配置到workspace Setting里面。
{
"window.zoomLevel": 1,
"go.autocompleteUnimportedPackages": true,
"go.gocodePackageLookupMode": "go",
"go.gotoSymbol.includeImports": true,
"go.useCodeSnippetsOnFunctionSuggest": true,
"go.inferGopath": true,
"go.gopath":"/usr/local/bin/golang19/gopath/",
"go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
}
其中重要的选项是
"go.inferGopath" 设置为 true .
"go.gopath" 设置自己的路径
到此,相信大家对“vscode写go代码怎么配置”有了更深的了解,不妨来实际操作一番吧!这里是天达云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!