doc: improve Editor Integration section (#3307)
This commit is contained in:
parent
c05045421c
commit
09fb4d7b46
@ -4,32 +4,50 @@ title: Integrations
|
|||||||
|
|
||||||
## Editor Integration
|
## Editor Integration
|
||||||
|
|
||||||
1. [Go for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go).
|
### [Go for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go).
|
||||||
Recommended settings for VS Code are:
|
|
||||||
|
|
||||||
```json
|
Recommended settings for VS Code are:
|
||||||
"go.lintTool":"golangci-lint",
|
|
||||||
"go.lintFlags": [
|
|
||||||
"--fast"
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
Using it in an editor without `--fast` can freeze your editor.
|
```json
|
||||||
Golangci-lint automatically discovers `.golangci.yml` config for edited file: you don't need to configure it in VS Code settings.
|
"go.lintTool": "golangci-lint",
|
||||||
|
"go.lintFlags": [
|
||||||
|
"--fast"
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
2. Sublime Text - [plugin](https://github.com/SublimeLinter/SublimeLinter-golangcilint) for SublimeLinter.
|
Using it in an editor without `--fast` can freeze your editor.
|
||||||
3. GoLand
|
Golangci-lint automatically discovers `.golangci.yml` config for edited file: you don't need to configure it in VS Code settings.
|
||||||
- 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.
|
### Sublime Text
|
||||||
- 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
|
There is a [plugin](https://github.com/SublimeLinter/SublimeLinter-golangcilint) for SublimeLinter.
|
||||||
- [Spacemacs](https://github.com/syl20bnr/spacemacs/blob/develop/layers/+lang/go/README.org#linting)
|
|
||||||
- [flycheck checker](https://github.com/weijiangan/flycheck-golangci-lint).
|
### GoLand
|
||||||
5. Vim
|
|
||||||
- [vim-go](https://github.com/fatih/vim-go)
|
How to configure:
|
||||||
- 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
|
- Install [plugin](https://plugins.jetbrains.com/plugin/12496-go-linter)
|
||||||
6. Atom - [go-plus](https://atom.io/packages/go-plus) supports golangci-lint.
|
- 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
|
## Shell Completion
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user