Skip to content

docs: update section about vscode integration #5706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 9, 2025
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions docs/src/docs/welcome/integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ 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).

<details>
<summary style={{color: '#737380'}}>Recommended settings</summary>

For those who installed golangci-lint manually:

```json
"go.lintTool": "golangci-lint",
"go.lintFlags": [
Expand All @@ -37,6 +37,29 @@ 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.

For those who want to install 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 `.golangci.yml` config for edited file: you don't need to configure it in VS Code settings.

</details>

### GNU Emacs
Expand Down
Loading