Skip to content

Instantly share code, notes, and snippets.

@souloss
Last active June 4, 2022 01:37
Show Gist options
  • Save souloss/74b593edea43c2e2aa2e62cfa1fa2fba to your computer and use it in GitHub Desktop.
Save souloss/74b593edea43c2e2aa2e62cfa1fa2fba to your computer and use it in GitHub Desktop.
vscode-golang-setting
{
"editor.formatOnPaste": true,
"editor.quickSuggestions": {
"other": "on",
"comments": "inline",
"strings": "inline"
},
"editor.quickSuggestionsDelay": 0,
"editor.hover.delay": 0,
"editor.accessibilityPageSize": 10000,
"editor.autoClosingBrackets": "always",
"editor.autoClosingQuotes": "always",
"go.inferGopath": false,
"gopls": {
"build.allowModfileModifications": true,
"build.experimentalWorkspaceModule": true,
"ui.completion.usePlaceholders": true
},
"go.gocodePackageLookupMode": "go",
"go.gotoSymbol.includeGoroot": true,
"go.gotoSymbol.includeImports": true,
"go.buildOnSave": "off",
"go.gocodeAutoBuild": true,
"go.installDependenciesWhenBuilding": true,
"go.buildFlags": [],
"go.buildTags": "",
"go.coverOnSingleTest": true,
"go.useCodeSnippetsOnFunctionSuggest": true,
"go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
// "go.docsTool": "guru",
"go.docsTool": "gogetdoc",
"go.formatTool": "goimports",
"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.codeActionsOnSave": {
"source.organizeImports": true
},
},
"go.alternateTools": {
"go-langserver": "gopls",
},
"go.useLanguageServer": false,
"go.languageServerFlags": [],
"go.languageServerExperimentalFeatures": {
"diagnostics": false
},
"go.testFlags": ["-v"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment