From 696de0ce69fff9b4b18baf001168a5158db43a4a Mon Sep 17 00:00:00 2001 From: Benjamin Kane Date: Thu, 20 Oct 2022 19:10:48 -0700 Subject: [PATCH 1/3] Update integrations.mdx Turn editor integration nested list of descriptions into headers and descriptions under. This facilitates linking to headers within the generated docs, is more consistent with the following Shell Completion section which uses this style, and I find it easier to read --- docs/src/docs/usage/integrations.mdx | 64 +++++++++++++++++----------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/docs/src/docs/usage/integrations.mdx b/docs/src/docs/usage/integrations.mdx index 81d66017cdf9..33f4e44a0831 100644 --- a/docs/src/docs/usage/integrations.mdx +++ b/docs/src/docs/usage/integrations.mdx @@ -4,32 +4,44 @@ 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 + +[Plugin](https://github.com/SublimeLinter/SublimeLinter-golangcilint) for SublimeLinter. + +### 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$`. + +### 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). + +### 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 + +### Atom + +[go-plus](https://atom.io/packages/go-plus) supports golangci-lint. ## Shell Completion From 6158573119c645f4f4dfc797507a1e21e4b6771e Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Tue, 25 Oct 2022 14:35:09 +0200 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Oleksandr Redko --- docs/src/docs/usage/integrations.mdx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/src/docs/usage/integrations.mdx b/docs/src/docs/usage/integrations.mdx index 33f4e44a0831..ab32a4b4b382 100644 --- a/docs/src/docs/usage/integrations.mdx +++ b/docs/src/docs/usage/integrations.mdx @@ -9,7 +9,7 @@ title: Integrations Recommended settings for VS Code are: ```json -"go.lintTool":"golangci-lint", +"go.lintTool": "golangci-lint", "go.lintFlags": [ "--fast" ] @@ -20,7 +20,7 @@ Golangci-lint automatically discovers `.golangci.yml` config for edited file: yo ### Sublime Text -[Plugin](https://github.com/SublimeLinter/SublimeLinter-golangcilint) for SublimeLinter. +There is a [plugin](https://github.com/SublimeLinter/SublimeLinter-golangcilint) for SublimeLinter. ### GoLand @@ -35,9 +35,11 @@ Golangci-lint automatically discovers `.golangci.yml` config for edited file: yo ### 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 +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 From ffbd1f40554639d7a323d90672b3888ded51e895 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Fri, 28 Oct 2022 17:42:16 +0200 Subject: [PATCH 3/3] review --- docs/src/docs/usage/integrations.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/src/docs/usage/integrations.mdx b/docs/src/docs/usage/integrations.mdx index ab32a4b4b382..1f347349323a 100644 --- a/docs/src/docs/usage/integrations.mdx +++ b/docs/src/docs/usage/integrations.mdx @@ -24,12 +24,16 @@ There is a [plugin](https://github.com/SublimeLinter/SublimeLinter-golangcilint) ### 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).