zoukankan      html  css  js  c++  java
  • vscode settings.json for golang

    to be continued/modified...

    go tools

    1. go env -w GOPROXY=https://goproxy.io,direct in shell
    2. >go: install/update tools in vscode
    // >settings.json
    {
        // ctrl-shift-x: clang-format
        // "editor.formatOnSave": true,
    
        // shell
        // powershell.exe, cmd.exe, bash.exe
        "terminal.integrated.shell.windows": "D:\Apps\Git\bin\bash.exe",
    
        // git 
        "git.path": "D:\Apps\Git\bin\git.exe",
        // "git.autofetch": true,
        
    
        // go gopath
        // "go.goroot": "D:\Go",
        // "go.gopath": "D:\Codes\golang",
        // "go.inferGopath": false,
        "go.toolsGopath": "D:\Codes\golang",
    
        // go pkg-lookup
        "go.gocodePackageLookupMode": "go",
        "go.gotoSymbol.includeGoroot": true,
        "go.gotoSymbol.includeImports": true,
    
        // go build
        "go.buildOnSave": "off",
        "go.gocodeAutoBuild": false,
        "go.installDependenciesWhenBuilding": true,
        "go.buildFlags": [],
        "go.buildTags": "",
        "go.coverOnSingleTest": true,
        "go.useCodeSnippetsOnFunctionSuggest": true,
        "go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
    
        // go tools
        "go.docsTool": "guru",
        "go.formatTool": "goimports", // includes gofmt
        "go.lintTool": "golangci-lint",
        "go.lintOnSave": "package",
        "go.lintFlags": [
            "--fast"
        ],
        "go.formatFlags": [],
        "go.vetFlags": [],
        "go.vetOnSave": "package",
        "go.generateTestsFlags": [],
        "go.liveErrors": {
            "enabled": true,
            "delay": 500
        },
        "go.gocodeFlags": [
            "-builtin",
            "-ignore-case",
            "-unimported-packages"
        ],
        "go.enableCodeLens": {
            "references": true,
            "runtest": true
        },
        "go.delveConfig": {
            "dlvLoadConfig": {
                "followPointers": true,
                "maxVariableRecurse": 1,
                "maxStringLen": 64,
                "maxArrayValues": 64,
                "maxStructFields": -1
            },
            "apiVersion": 2,
            "showGlobalVariables": true
        },
        "go.editorContextMenuCommands": {
            "toggleTestFile": true,
            "addTags": true,
            "removeTags": true,
            "testAtCursor": true,
            "testFile": true,
            "testPackage": true,
            "generateTestForFunction": true,
            "generateTestForFile": true,
            "generateTestForPackage": true,
            "addImport": true,
            "testCoverage": true,
            "playground": true,
            "debugTestAtCursor": true
        },
        "go.playground": {
            "openbrowser": false,
            "share": false,
            "run": false
        },
        "go.addTags": {
            "tags": "json",
            "options": "json=omitempty",
            "promptForTags": true,
            "transform": "snakecase"
        },
        "go.removeTags": {
            "tags": "",
            "options": "",
            "promptForTags": false
        },
        "[go]": {
            "editor.formatOnSave": true,
            "editor.codeActionsOnSave": {
                "source.organizeImports": true
            },
        },
        "go.alternateTools": {
            "go-langserver": "gopls",
        },
        "go.useLanguageServer": false,
        "go.languageServerFlags": [],
        "go.languageServerExperimentalFeatures": {
            "format": true,
            "autoComplete": true,
            "rename": true,
            "goToDefinition": true,
            "hover": true,
            "signatureHelp": true,
            "goToTypeDefinition": true,
            "goToImplementation": true,
            "documentSymbols": true,
            "workspaceSymbols": true,
            "findReferences": true,
            "diagnostics": false
        },
        "go.testFlags": ["-v"], // unit-testing visible
        "go.autocompleteUnimportedPackages": true,
    }
    
  • 相关阅读:
    详细的描述一个测试活动完整的过程
    黑盒测试的测试用例常见设计方法都有哪些?请分别以具体的例子来说明这些方法在测试用例设计工作中的应用。
    测试计划工作的目的是什么?测试计划文档的内容应该包括什么?其中哪些是最重要的?
    redo log 有什么作用?
    Spring的简介和优点?
    java的语法基础(二)
    相对于Statement,PreparedStatement的优点是什么?
    MyBatis 的好处是什么?
    python中字符串的编码和解码
    相对于Statement,PreparedStatement的优点是什么?
  • 原文地址:https://www.cnblogs.com/qhinqiwei/p/13237471.html
Copyright © 2011-2022 走看看