Please enable Javascript to view the contents

vscode配置

 ·  ☕ 1 分钟 · 👀... 阅读

vscode配置

安装好Go相关插件,配置工具包

使用command+shift+P快捷键,然后键入Go: Install/Update Tools选中全部(根据需要),稍等片刻,就会安装完成。

自定义配置项

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
    "git.autofetch": true,
    "files.autoSave": "onWindowChange",
    "workbench.colorTheme": "Go - Sources",
    "terminal.integrated.shell.osx": "/bin/zsh",
    "go.autocompleteUnimportedPackages": true,
    "go.gocodeAutoBuild": true,
    "go.useLanguageServer": true,
    "goOutliner.enableDebugChannel": true,
    "goOutliner.extendExplorerTab": true,
    "go.inferGopath": true,
    "go.docsTool": "godoc",
    "go.gocodePackageLookupMode": "go",
    "go.gotoSymbol.includeImports": true,
    "go.useCodeSnippetsOnFunctionSuggest": true, //使用代码片段提示
    "go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
    "go.formatTool": "goimports", //代码格式化
   // "go.buildOnSave": true, //保存代码时自动编译
    "go.lintOnSave": "file", //保存代码时优化
    "go.vetOnSave": "package", //保存代码时检查潜在错误
    "go.coverOnSave": false //保存代码时执行测试
}
分享

ysicing
作者
ysicing
云原生爱好者


目录