Skip to content

doc: improve Editor Integration section #3307

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 4 commits into from
Nov 2, 2022
Merged
Changes from all 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
70 changes: 44 additions & 26 deletions docs/src/docs/usage/integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,50 @@ title: Integrations

## Editor Integration

1. [Go for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go).
Recommended settings for VS Code are:

```json
"go.lintTool":"golangci-lint",
"go.lintFlags": [
"--fast"
]
```

Using it in an editor without `--fast` 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.

2. Sublime Text - [plugin](https://github.com/SublimeLinter/SublimeLinter-golangcilint) for SublimeLinter.
3. GoLand
- Install [plugin](https://plugins.jetbrains.com/plugin/12496-go-linter)
- Add [File Watcher](https://www.jetbrains.com/help/go/settings-tools-file-watchers.html) using existing `golangci-lint` template.
- If your version of GoLand does not have the `golangci-lint` [File Watcher](https://www.jetbrains.com/help/go/settings-tools-file-watchers.html) template you can configure your own and use arguments `run --disable=typecheck $FileDir$`.
4. GNU Emacs
- [Spacemacs](https://github.com/syl20bnr/spacemacs/blob/develop/layers/+lang/go/README.org#linting)
- [flycheck checker](https://github.com/weijiangan/flycheck-golangci-lint).
5. Vim
- [vim-go](https://github.com/fatih/vim-go)
- syntastic [merged pull request](https://github.com/vim-syntastic/syntastic/pull/2190) with golangci-lint support
- ale [merged pull request](https://github.com/w0rp/ale/pull/1890) with golangci-lint support
6. Atom - [go-plus](https://atom.io/packages/go-plus) supports golangci-lint.
### [Go for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go).

Recommended settings for VS Code are:

```json
"go.lintTool": "golangci-lint",
"go.lintFlags": [
"--fast"
]
```

Using it in an editor without `--fast` 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.

### Sublime Text

There is a [plugin](https://github.com/SublimeLinter/SublimeLinter-golangcilint) for SublimeLinter.

### GoLand

How to configure:

- Install [plugin](https://plugins.jetbrains.com/plugin/12496-go-linter)
- Add [File Watcher](https://www.jetbrains.com/help/go/settings-tools-file-watchers.html) using existing `golangci-lint` template.
- If your version of GoLand does not have the `golangci-lint` [File Watcher](https://www.jetbrains.com/help/go/settings-tools-file-watchers.html) template you can configure your own and use arguments `run --disable=typecheck $FileDir$`.

### GNU Emacs

There are available plugins:

- [Spacemacs](https://github.com/syl20bnr/spacemacs/blob/develop/layers/+lang/go/README.org#linting)
- [flycheck checker](https://github.com/weijiangan/flycheck-golangci-lint).

### Vim

The following plugins support `golangci-lint`:

- [vim-go](https://github.com/fatih/vim-go);
- [ALE](https://github.com/w0rp/ale);
- [Syntastic](https://github.com/vim-syntastic/syntastic).

### Atom

[go-plus](https://atom.io/packages/go-plus) supports golangci-lint.

## Shell Completion

Expand Down