vscode配置

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

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

自定义配置项

{
    "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 //保存代码时执行测试
}
Copyright © 2020 | 仅供学习参考,不可用于其他途径. all right reserved,powered by Gitbook Updated at 2020-04-05 16:00:39

results matching ""

    No results matching ""