@@ -12,12 +12,10 @@ Install [plugin](https://plugins.jetbrains.com/plugin/12496-go-linter).
12
12
13
13
### Visual Studio Code
14
14
15
- The integration for golangci-lint v2 is currently in work in progress: [ vscode-go #3732 ] ( https://github.com/golang/vscode-go/issues/3732 ) .
16
-
17
15
Install the [ extension] ( https://marketplace.visualstudio.com/items?itemName=golang.Go ) .
18
16
19
17
<details >
20
- <summary style = { {color: ' #737380' }} >Recommended settings</summary >
18
+ <summary style = { {color: ' #737380' }} >Recommended settings for those who installed golangci-lint manually </summary >
21
19
22
20
``` json
23
21
"go.lintTool" : " golangci-lint" ,
@@ -35,7 +33,34 @@ Install the [extension](https://marketplace.visualstudio.com/items?itemName=gola
35
33
```
36
34
37
35
Using it in an editor without ` --fast-only ` can freeze your editor.
38
- Golangci-lint automatically discovers ` .golangci.yml ` config for edited file: you don't need to configure it in VS Code settings.
36
+ Golangci-lint automatically discovers the ` .golangci.yml ` config for the edited file, so you don't need to configure it in VS Code settings.
37
+
38
+ </details >
39
+
40
+ <details >
41
+ <summary style = { {color: ' #737380' }} >Recommended settings for those who installed golangci-lint via extension</summary >
42
+
43
+ Install ` golangci-lint-v2 ` via the ` Go: Install/Update Tools ` command after setting these configs.
44
+ This will enable golangci-lint v1 to co-exist with v2.
45
+ And use the following settings:
46
+
47
+ ``` json
48
+ "go.lintTool" : " golangci-lint-v2" ,
49
+ "go.lintFlags" : [
50
+ " --fast-only"
51
+ ],
52
+ "go.formatTool" : " custom" ,
53
+ "go.alternateTools" : {
54
+ "customFormatter" : " golangci-lint-v2"
55
+ },
56
+ "go.formatFlags" : [
57
+ " fmt" ,
58
+ " --stdin"
59
+ ]
60
+ ```
61
+
62
+ Using it in an editor without ` --fast-only ` can freeze your editor.
63
+ Golangci-lint automatically discovers the ` .golangci.yml ` config for the edited file, so you don't need to configure it in VS Code settings.
39
64
40
65
</details >
41
66
0 commit comments