|
1 | 1 | { |
2 | | - // ============================================================ |
3 | | - // GO LANGUAGE CONFIGURATION |
4 | | - // ============================================================ |
5 | 2 | "[go.mod]": { |
6 | 3 | "editor.codeActionsOnSave": { |
7 | 4 | "source.organizeImports": "explicit" |
|
12 | 9 | "editor.codeActionsOnSave": { |
13 | 10 | "source.organizeImports": "explicit" |
14 | 11 | }, |
15 | | - "editor.formatOnSave": true, |
16 | | - "editor.defaultFormatter": "golang.go" |
| 12 | + "editor.defaultFormatter": "golang.go", |
| 13 | + "editor.formatOnSave": true |
17 | 14 | }, |
18 | 15 | "[go][go.mod]": { |
19 | 16 | "editor.codeActionsOnSave": { |
20 | 17 | "source.organizeImports": "explicit" |
21 | 18 | } |
22 | 19 | }, |
23 | | - |
24 | | - // ============================================================ |
25 | | - // OTHER LANGUAGE CONFIGURATIONS |
26 | | - // ============================================================ |
27 | 20 | "[yaml]": { |
28 | 21 | "editor.defaultFormatter": "redhat.vscode-yaml" |
29 | 22 | }, |
30 | 23 | "files.associations": { |
31 | 24 | "application.yaml": "yaml-cloudformation" |
32 | 25 | }, |
33 | | - |
34 | | - // ============================================================ |
35 | | - // GO TOOLS & LANGUAGE SERVER |
36 | | - // ============================================================ |
37 | | - "go.useLanguageServer": true, |
38 | | - "go.toolsManagement.autoUpdate": true, |
39 | | - |
40 | | - // ============================================================ |
41 | | - // INLAY HINTS |
42 | | - // ============================================================ |
| 26 | + "go.addTags": { |
| 27 | + "options": "json=omitempty", |
| 28 | + "promptForTags": false, |
| 29 | + "tags": "json", |
| 30 | + "transform": "snakecase" |
| 31 | + }, |
| 32 | + "go.coverOnSave": false, |
| 33 | + "go.coverageDecorator": { |
| 34 | + "coveredHighlightColor": "rgba(64,128,64,0.5)", |
| 35 | + "type": "gutter", |
| 36 | + "uncoveredHighlightColor": "rgba(128,64,64,0.25)" |
| 37 | + }, |
| 38 | + "go.delveConfig": { |
| 39 | + "debugAdapter": "dlv-dap", |
| 40 | + "dlvLoadConfig": { |
| 41 | + "followPointers": true, |
| 42 | + "maxArrayValues": 64, |
| 43 | + "maxStringLen": 256, |
| 44 | + "maxStructFields": -1, |
| 45 | + "maxVariableRecurse": 1 |
| 46 | + }, |
| 47 | + "showGlobalVariables": false |
| 48 | + }, |
| 49 | + "go.enableCodeLens": { |
| 50 | + "runtest": true |
| 51 | + }, |
43 | 52 | "go.inlayHints.assignVariableTypes": true, |
44 | 53 | "go.inlayHints.compositeLiteralFields": true, |
45 | 54 | "go.inlayHints.compositeLiteralTypes": true, |
46 | 55 | "go.inlayHints.constantValues": true, |
47 | 56 | "go.inlayHints.functionTypeParameters": true, |
48 | 57 | "go.inlayHints.parameterNames": true, |
49 | 58 | "go.inlayHints.rangeVariableTypes": true, |
50 | | - |
51 | | - // ============================================================ |
52 | | - // LINTING |
53 | | - // ============================================================ |
54 | | - "go.lintTool": "golangci-lint", |
55 | 59 | "go.lintFlags": [ |
56 | 60 | "--fast", |
57 | 61 | "--timeout=5m" |
58 | 62 | ], |
59 | 63 | "go.lintOnSave": "package", |
60 | | - |
61 | | - // ============================================================ |
62 | | - // TESTING |
63 | | - // ============================================================ |
| 64 | + "go.lintTool": "golangci-lint", |
64 | 65 | "go.testExplorerPackages": ".*", |
65 | 66 | "go.testFlags": [ |
66 | 67 | "-v", |
67 | 68 | "-race", |
68 | 69 | "-count=1" |
69 | 70 | ], |
70 | | - "go.coverOnSave": false, |
71 | | - "go.coverageDecorator": { |
72 | | - "type": "gutter", |
73 | | - "coveredHighlightColor": "rgba(64,128,64,0.5)", |
74 | | - "uncoveredHighlightColor": "rgba(128,64,64,0.25)" |
75 | | - }, |
76 | | - |
77 | | - // ============================================================ |
78 | | - // CODE LENS |
79 | | - // ============================================================ |
80 | | - "go.enableCodeLens": { |
81 | | - "runtest": true |
82 | | - }, |
83 | | - |
84 | | - // ============================================================ |
85 | | - // DEBUGGING (Delve) |
86 | | - // ============================================================ |
87 | | - "go.delveConfig": { |
88 | | - "dlvLoadConfig": { |
89 | | - "followPointers": true, |
90 | | - "maxVariableRecurse": 1, |
91 | | - "maxStringLen": 256, |
92 | | - "maxArrayValues": 64, |
93 | | - "maxStructFields": -1 |
94 | | - }, |
95 | | - "showGlobalVariables": false, |
96 | | - "debugAdapter": "dlv-dap" |
97 | | - }, |
98 | | - |
99 | | - // ============================================================ |
100 | | - // STRUCT TAG MANAGEMENT |
101 | | - // ============================================================ |
102 | | - "go.addTags": { |
103 | | - "tags": "json", |
104 | | - "options": "json=omitempty", |
105 | | - "promptForTags": false, |
106 | | - "transform": "snakecase" |
107 | | - }, |
108 | | - |
109 | | - // ============================================================ |
110 | | - // GOPLS (LANGUAGE SERVER) CONFIGURATION |
111 | | - // ============================================================ |
| 71 | + "go.toolsManagement.autoUpdate": true, |
| 72 | + "go.useLanguageServer": true, |
112 | 73 | "gopls": { |
113 | | - // -------------------------------------------------------- |
114 | | - // Formatting (gofumpt for stricter formatting) |
115 | | - // -------------------------------------------------------- |
116 | | - "formatting.gofumpt": true, |
117 | | - |
118 | | - // -------------------------------------------------------- |
119 | | - // IMPORTANT: Project-Specific Module Path |
120 | | - // For multi-project use, update this to your module path: |
121 | | - // Example: "github.com/yourorg/yourproject" |
122 | | - // Or remove this setting to use auto-detection |
123 | | - // -------------------------------------------------------- |
124 | | - "formatting.local": "github.com/bsv-blockchain/go-template", |
125 | | - |
126 | | - // -------------------------------------------------------- |
127 | | - // UI & Completion Features |
128 | | - // -------------------------------------------------------- |
129 | | - "ui.semanticTokens": true, |
130 | | - "ui.completion.completeFunctionCalls": true, |
131 | | - "ui.completion.usePlaceholders": true, |
132 | | - |
133 | | - // -------------------------------------------------------- |
134 | | - // Symbol Navigation |
135 | | - // -------------------------------------------------------- |
136 | | - "symbolMatcher": "fastfuzzy", |
137 | | - "symbolStyle": "full", |
138 | | - "ui.navigation.importShortcut": "Definition", |
139 | | - |
140 | | - // -------------------------------------------------------- |
141 | | - // Enhanced Diagnostics & Static Analysis |
142 | | - // Extends the 60+ golangci-lint philosophy into the IDE |
143 | | - // -------------------------------------------------------- |
144 | | - "ui.diagnostic.staticcheck": true, |
145 | | - "ui.diagnostic.analyses": { |
146 | | - "unusedparams": true, |
147 | | - "shadow": true, |
148 | | - "unusedwrite": true, |
149 | | - "nilness": true, |
150 | | - "unusedvariable": true |
151 | | - }, |
152 | | - |
153 | | - // -------------------------------------------------------- |
154 | | - // Build Performance (Exclude directories from analysis) |
155 | | - // -------------------------------------------------------- |
156 | 74 | "build.directoryFilters": [ |
157 | 75 | "-node_modules", |
158 | 76 | "-vendor", |
159 | 77 | "-.git", |
160 | 78 | "-dist", |
161 | 79 | "-build", |
162 | 80 | "-.mage-cache" |
163 | | - ] |
| 81 | + ], |
| 82 | + "formatting.gofumpt": true, |
| 83 | + "formatting.local": "github.com/bsv-blockchain/go-template", |
| 84 | + "symbolMatcher": "fastfuzzy", |
| 85 | + "symbolStyle": "full", |
| 86 | + "ui.completion.completeFunctionCalls": true, |
| 87 | + "ui.completion.usePlaceholders": true, |
| 88 | + "ui.diagnostic.analyses": { |
| 89 | + "nilness": true, |
| 90 | + "shadow": true, |
| 91 | + "unusedparams": true, |
| 92 | + "unusedvariable": true, |
| 93 | + "unusedwrite": true |
| 94 | + }, |
| 95 | + "ui.diagnostic.staticcheck": true, |
| 96 | + "ui.navigation.importShortcut": "Definition", |
| 97 | + "ui.semanticTokens": true |
164 | 98 | } |
165 | 99 | } |
0 commit comments