diff --git a/docs/src/docs/welcome/integrations.mdx b/docs/src/docs/welcome/integrations.mdx index 2da993e0242d..11a4889da617 100644 --- a/docs/src/docs/welcome/integrations.mdx +++ b/docs/src/docs/welcome/integrations.mdx @@ -12,12 +12,10 @@ Install [plugin](https://plugins.jetbrains.com/plugin/12496-go-linter). ### Visual Studio Code -The integration for golangci-lint v2 is currently in work in progress: [vscode-go#3732](https://github.com/golang/vscode-go/issues/3732). - Install the [extension](https://marketplace.visualstudio.com/items?itemName=golang.Go).
-Recommended settings +Recommended settings for those who installed golangci-lint manually ```json "go.lintTool": "golangci-lint", @@ -35,7 +33,34 @@ Install the [extension](https://marketplace.visualstudio.com/items?itemName=gola ``` Using it in an editor without `--fast-only` can freeze your editor. -Golangci-lint automatically discovers `.golangci.yml` config for edited file: you don't need to configure it in VS Code settings. +Golangci-lint automatically discovers the `.golangci.yml` config for the edited file, so you don't need to configure it in VS Code settings. + +
+ +
+Recommended settings for those who installed golangci-lint via extension + +Install `golangci-lint-v2` via the `Go: Install/Update Tools` command after setting these configs. +This will enable golangci-lint v1 to co-exist with v2. +And use the following settings: + +```json +"go.lintTool": "golangci-lint-v2", +"go.lintFlags": [ + "--fast-only" +], +"go.formatTool": "custom", +"go.alternateTools": { + "customFormatter": "golangci-lint-v2" +}, +"go.formatFlags": [ + "fmt", + "--stdin" +] +``` + +Using it in an editor without `--fast-only` can freeze your editor. +Golangci-lint automatically discovers the `.golangci.yml` config for the edited file, so you don't need to configure it in VS Code settings.