-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsettings.json
173 lines (173 loc) · 5.65 KB
/
settings.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
{
"terminal.external.osxExec": "iTerm.app",
"terminal.external.linuxExec": "tilix",
"terminal.integrated.shell.osx": "/usr/local/bin/zsh",
"terminal.integrated.shell.linux": "/bin/zsh",
// Enable native tabs (macOS-only for now)
"window.nativeTabs": true,
// Enable new context menu (Linux-only for now)
// "window.titleBarStyle": "custom",
"breadcrumbs.enabled": true,
// Fira Code can be downloaded here: https://github.com/tonsky/FiraCode/wiki
"editor.fontFamily": "Fira Code",
"editor.fontSize": 13,
// Enable font ligatures (Fira Code supports them)
"editor.fontLigatures": true,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.wordWrap": "on",
"editor.renderControlCharacters": false,
"editor.copyWithSyntaxHighlighting": true,
"extensions.autoUpdate": true,
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"telemetry.enableTelemetry": false,
"window.zoomLevel": 0,
"workbench.startupEditor": "newUntitledFile",
// One Dark Pro theme
"workbench.colorTheme": "One Dark Pro",
// Material Icon Theme pack
"workbench.iconTheme": "material-icon-theme",
"files.associations": {
"*.lock": "toml",
"*.tpl": "gohtml",
"CHANGELOG": "markdown",
"README": "markdown",
"Dockerfile*": "dockerfile",
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/desktop.ini": true
},
// Golang templates
"emmet.syntaxProfiles": {
"tpl": "html"
},
"emmet.triggerExpansionOnTab": true,
"git.autofetch": true,
"git.confirmSync": false,
"git.enableSmartCommit": true,
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/vendor": true,
},
// Go-related settings for Go modules and gopls
// =========================
"go.autocompleteUnimportedPackages": true,
"go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
"go.docsTool": "godoc",
"go.formatTool": "goimports", // this will be ignored if gopls has option '"format": true', see gopls section below
"go.formatFlags": [
"--local=github.com/your/repo"
],
// I suggest either golangci-lint or revive, see related configs in this repo
"go.lintTool": "golangci-lint",
// "go.lintTool": "revive",
"go.lintFlags": [
"--config=$YOUR_CONFIG_FOLDER/.golangci.yml"
// "--config=$YOUR_CONFIG_FOLDER/revive.toml"
],
"go.buildOnSave": "off",
"go.vetOnSave": "off",
"go.lintOnSave": "package", // use "workspace" if your project is small enough for linter to work fast
"go.coverageDecorator": {
"type": "gutter"
},
"go.coverageOptions": "showUncoveredCodeOnly",
"go.coverOnTestPackage": true,
"go.coverOnSingleTest": false,
"go.testFlags": [
"-v",
"-cover",
// "-count=1", - add this to remove test caching
],
"go.addTags": {
"tags": "json",
"promptForTags": false,
"transform": "snakecase"
},
"go.enableCodeLens": {
"references": false,
"runtest": true
},
"go.useLanguageServer": true,
"go.languageServerExperimentalFeatures": {
"autoComplete": true,
"diagnostics": true,
"documentLink": false, // to remove import links to godoc
"documentSymbols": true,
"findReferences": true,
"format": false, // to let goimports/gofmt/goreturns format the code instead of gopls
"goToDefinition": true,
"goToTypeDefinition": true,
"highlight": true,
"hover": true,
"incrementalSync": true,
"rename": true,
"signatureHelp": true,
"workspaceSymbols": true,
},
"gopls": {
"usePlaceholders": true, // add parameter placeholders when completing a function
"staticcheck": false, // add staticcheck linter capabilities
// Experimental settings
"completeUnimported": true, // autocomplete unimported packages
"watchFileChanges": true, // watch file changes outside of the editor
"deepCompletion": true, // enable deep completion
},
"[go]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.codeActionsOnSaveTimeout": 3000,
"editor.defaultFormatter": "ms-vscode.Go",
"editor.snippetSuggestions": "inline",
},
"files.eol": "\n",
// Other extensions
// =========================
"clang-format.style": "{BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 100}",
"protoc": {
"options": [
"--proto_path=protos/v3",
"--proto_path=protos/v2",
"--proto_path=${workspaceFolder}/api",
"--proto_path=${workspaceFolder}/vendor.pb",
"--proto_path=${env.GOPATH}/src",
],
},
"[proto3]": {
"editor.defaultFormatter": "xaver.clang-format"
},
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
},
"[helm]": {
"editor.defaultFormatter": "redhat.vscode-yaml",
},
"pgFormatter.formatType": false,
"yaml.format.enable": true,
"todohighlight.isEnable": true,
"todohighlight.include": [
"**/*.go",
"**/*.md"
],
"todohighlight.exclude": [
"**/node_modules/**",
"**/bower_components/**",
"**/dist/**",
"**/build/**",
"**/.vscode/**",
"**/.github/**",
"**/_output/**",
"**/*.min.*",
"**/*.map",
"**/.next/**",
"**/vendor/**"
],
}