vscode golang 设置

   日期:2020-09-01     浏览:104    评论:0    
核心提示:vscode 用 gopls : is the official language server for the Go languagevscode 设置参考:    vscode-gopls 设置{ go.useLanguageServer: true, [go]: { editor.formatOnSave: true, editor.codeActionsOnSave: { source.organizeI

vscode 用 gopls : is the official language server for the Go language
vscode 设置参考:
    vscode-gopls 设置
注意: 打开一个项目,不能打开多个项目。即打开有go.mod的目录 ,否则不能跳转,甚至有错误提示。

{
    "go.useLanguageServer": true,
    "[go]": {
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.organizeImports": true,
        },
        // Optional: Disable snippets, as they conflict with completion ranking.
        "editor.snippetSuggestions": "none",
    },
    "[go.mod]": {
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.organizeImports": true,
        },
    },
    "gopls": {
        // Add parameter placeholders when completing a function.
        "usePlaceholders": true,

        // If true, enable additional analyses with staticcheck.
        // Warning: This will significantly increase memory usage.
        "staticcheck": false,
    },
    //个人喜欢
    "go.docsTool": "gogetdoc"
    "files.autoSave": "afterDelay",
    "files.autoSaveDelay": 500,
    "editor.fontSize": 16,
}
 
打赏
 本文转载自:网络 
所有权利归属于原作者,如文章来源标示错误或侵犯了您的权利请联系微信13520258486
更多>最近资讯中心
更多>最新资讯中心
0相关评论

推荐图文
推荐资讯中心
点击排行
最新信息
新手指南
采购商服务
供应商服务
交易安全
关注我们
手机网站:
新浪微博:
微信关注:

13520258486

周一至周五 9:00-18:00
(其他时间联系在线客服)

24小时在线客服