mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-03 01:53:30 +08:00
Enable gopls by default with GOPATH detection
This commit is contained in:
@@ -194,12 +194,30 @@ g:ale_go_gometalinter_lint_package *g:ale_go_gometalinter_lint_package*
|
||||
===============================================================================
|
||||
gopls *ale-go-gopls*
|
||||
|
||||
gopls is the official Go language server, and is enabled for use with ALE by
|
||||
default.
|
||||
|
||||
To install the latest stable version of `gopls` to your `$GOPATH`, try the
|
||||
following command: >
|
||||
|
||||
GO111MODULE=on go get golang.org/x/tools/gopls@latest
|
||||
<
|
||||
If `$GOPATH` is readable by ALE, it should probably work without you having to
|
||||
do anything else. See the `gopls` README file for more information:
|
||||
|
||||
https://github.com/golang/tools/blob/master/gopls/README.md
|
||||
|
||||
|
||||
g:ale_go_gopls_executable *g:ale_go_gopls_executable*
|
||||
*b:ale_go_gopls_executable*
|
||||
Type: |String|
|
||||
Default: `'gopls'`
|
||||
|
||||
Location of the gopls binary file.
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
ALE will search for `gopls` in locally installed directories first by
|
||||
default, and fall back on a globally installed `gopls` if it can't be found
|
||||
otherwise.
|
||||
|
||||
|
||||
g:ale_go_gopls_options *g:ale_go_gopls_options*
|
||||
@@ -229,6 +247,15 @@ g:ale_go_gopls_init_options *g:ale_go_gopls_init_options*
|
||||
For a full list of supported analyzers, see:
|
||||
https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md
|
||||
|
||||
|
||||
g:ale_go_gopls_use_global *g:ale_go_gopls_use_global*
|
||||
*b:ale_go_gopls_use_global*
|
||||
Type: |String|
|
||||
Default: `get(g:, 'ale_use_global_executables', 0)`
|
||||
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
===============================================================================
|
||||
govet *ale-go-govet*
|
||||
|
||||
|
||||
@@ -1580,7 +1580,7 @@ g:ale_linters *g:ale_linters*
|
||||
\ 'apkbuild': ['apkbuild_lint', 'secfixes_check'],
|
||||
\ 'csh': ['shell'],
|
||||
\ 'elixir': ['credo', 'dialyxir', 'dogma'],
|
||||
\ 'go': ['gofmt', 'golint', 'go vet'],
|
||||
\ 'go': ['gofmt', 'golint', 'gopls', 'govet'],
|
||||
\ 'hack': ['hack'],
|
||||
\ 'help': [],
|
||||
\ 'inko': ['inko'],
|
||||
|
||||
Reference in New Issue
Block a user