diff options
author | w0rp <devw0rp@gmail.com> | 2017-11-14 19:55:28 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-11-14 19:55:46 +0000 |
commit | 6b2c61a5cc59d61270266dbe399d5dc55cfad5b4 (patch) | |
tree | 1eca19b412753868059467df9043d737b155d680 /doc | |
parent | 2e9cd978a23c60d061b4b4dd7fb46d2d2949e08e (diff) | |
download | ale-6b2c61a5cc59d61270266dbe399d5dc55cfad5b4.zip |
Fix #1128 - Add g:ale_linters_explicit for only enabling linters explicitly
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ale.txt | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/doc/ale.txt b/doc/ale.txt index b653e5c4..cd6a3a0d 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -946,23 +946,25 @@ g:ale_linters *g:ale_linters* Type: |Dictionary| Default: `{}` - The |g:ale_linters| option sets a |Dictionary| mapping a filetype - to a |List| of linter programs to be run when checking particular filetypes. - Only the filetypes specified in the dictionary will be limited in terms - of which linters will be run. + The |g:ale_linters| option sets a |Dictionary| mapping a filetype to a + |List| of linter programs to be run when checking particular filetypes. This |Dictionary| will be merged with a default dictionary containing the following values: > { \ 'csh': ['shell'], + \ 'go': ['gofmt', 'golint', 'go vet'], + \ 'help': [], + \ 'python': ['flake8', 'mypy', 'pylint'], \ 'rust': ['cargo'], + \ 'spec': [], \ 'text': [], \ 'zsh': ['shell'], \} < This option can be used to enable only a particular set of linters for a - file. For example, you can enable only 'eslint' for JavaScript files: > + file. For example, you can enable only `eslint` for JavaScript files: > let g:ale_linters = {'javascript': ['eslint']} < @@ -971,14 +973,15 @@ g:ale_linters *g:ale_linters* let g:ale_linters = {'javascript': []} < - All linters available for a given filetype can be enabled by using the - string `'all'`: > + All linters will be run for unspecified filetypes. All available linters can + be enabled explicitly for a given filetype by passing the string `'all'`, + instead of a List. > let g:ale_linters = {'c': 'all'} < Linters can be configured in each buffer with buffer-local variables. ALE will first look for linters for filetypes in the `b:ale_linters` variable, - then `g:ale_linters`, and then a default Dictionary. + then `g:ale_linters`, and then the default Dictionary mentioned above. `b:ale_linters` can be set to a List, or the string `'all'`. When linters for two different filetypes share the same name, the first linter loaded @@ -994,6 +997,19 @@ g:ale_linters *g:ale_linters* " Explicitly enable all available linters for the filetype. let b:ale_linters = 'all' < + ALE can be configured to disable all linters unless otherwise specified with + `g:ale_enabled` or `b:ale_enabled` with the option |g:ale_linters_explicit|. + + +g:ale_linters_explicit *g:ale_linters_explicit* + + Type: |Number| + Default: `0` + + When set to `1`, only the linters from |g:ale_linters| and |b:ale_linters| + will be enabled. The default behavior for ALE is to enable as many linters + as possible, unless otherwise specified. + g:ale_loclist_msg_format *g:ale_loclist_msg_format* |