Skip to content

Instantly share code, notes, and snippets.

@manjeettahkur
Last active January 26, 2022 16:09
Show Gist options
  • Save manjeettahkur/dd359771ceb88c08a3d4a53677f3f789 to your computer and use it in GitHub Desktop.
Save manjeettahkur/dd359771ceb88c08a3d4a53677f3f789 to your computer and use it in GitHub Desktop.
Go Language tools setting inside vs-code. it will check all the rules using go tools and show warning or error if any found. for example Structure size optimization in Go-lang (alignment/padding). setting for this "fieldalignment": true,
{
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.fontWeight": "500",
"editor.suggestSelection": "first",
"editor.cursorBlinking": "expand",
"editor.cursorSmoothCaretAnimation": true,
"terminal.integrated.rightClickBehavior": "default",
"editor.fontSize": 16,
"workbench.colorCustomizations": {
"terminal.background": "#090300",
"terminal.foreground": "#A5A2A2",
"terminalCursor.background": "#A5A2A2",
"terminalCursor.foreground": "#A5A2A2",
"terminal.ansiBlack": "#090300",
"terminal.ansiBlue": "#01A0E4",
"terminal.ansiBrightBlack": "#5C5855",
"terminal.ansiBrightBlue": "#01A0E4",
"terminal.ansiBrightCyan": "#B5E4F4",
"terminal.ansiBrightGreen": "#01A252",
"terminal.ansiBrightMagenta": "#A16A94",
"terminal.ansiBrightRed": "#DB2D20",
"terminal.ansiBrightWhite": "#F7F7F7",
"terminal.ansiBrightYellow": "#FDED02",
"terminal.ansiCyan": "#B5E4F4",
"terminal.ansiGreen": "#01A252",
"terminal.ansiMagenta": "#A16A94",
"terminal.ansiRed": "#DB2D20",
"terminal.ansiWhite": "#A5A2A2",
"terminal.ansiYellow": "#FDED02"
},
"go.useLanguageServer": true,
"go.autocompleteUnimportedPackages": true,
"go.toolsManagement.autoUpdate": true,
"go.editorContextMenuCommands": {
"benchmarkAtCursor": true,
"debugTestAtCursor": true,
"generateTestForFile": true,
"playground": false,
"fillStruct": true
},
"go.languageServerFlags": [
"serve",
"-rpc.trace",
"--debug=localhost:6060",
],
"go.testFlags": ["-race", "-vet=off"],
"go.enableCodeLens": {
"references": true,
"runtest": true,
},
"go.lintOnSave": "package",
"go.liveErrors": {
"enabled": true,
"delay": 500,
},
"go.testExplorer.alwaysRunBenchmarks": true,
"go.useCodeSnippetsOnFunctionSuggest": true,
"security.workspace.trust.untrustedFiles": "open",
"go.delveConfig": {
"dlvLoadConfig": {
"followPointers": true,
"maxVariableRecurse": 3,
"maxStringLen": 100,
"maxArrayValues": 100,
"maxStructFields": -1
},
"apiVersion": 2,
"showGlobalVariables": false,
"substitutePath": [],
"hideSystemGoroutines": true,
},
"go.lintTool": "golangci-lint",
"go.lintFlags": [
"--fast"
],
"go.testTimeout": "30s",
"gopls": {
"usePlaceholders": true, // add parameter placeholders when completing a function
"analyses": {
"fieldalignment": true,
"fillreturns": true,
"ifaceassert": true,
"shadow": true,
"unusedwrite": true,
"unusedparams": true,
"nilness": true,
},
},
"editor.quickSuggestionsDelay": 10,
"workbench.colorTheme": "Darcula",
"extensions.ignoreRecommendations": true,
"diffEditor.ignoreTrimWhitespace": false,
"files.autoSave": "afterDelay",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment