summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-11 23:55:04 +0000
committerw0rp <devw0rp@gmail.com>2017-11-12 10:56:53 +0000
commitb98387d0fa9452a70f383ac19deb4d109ddf38ec (patch)
tree4651f95d161a319858f2ba10c1df7d598e1b23c7 /doc
parent099df0af522fddda09b50fd9ffe1f66cab310607 (diff)
downloadale-b98387d0fa9452a70f383ac19deb4d109ddf38ec.zip
#1108 Support using Lists and 'all' for b:ale_linters
Diffstat (limited to 'doc')
-rw-r--r--doc/ale.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/doc/ale.txt b/doc/ale.txt
index b070414a..6d6a449b 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -946,6 +946,20 @@ g:ale_linters *g:ale_linters*
will first look for linters for filetypes in the `b:ale_linters` variable,
then `g:ale_linters`, and then a default Dictionary.
+ `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
+ will be used. Any ambiguity can be resolved by using a Dictionary specifying
+ which linter to run for which filetype instead. >
+
+ " Use ESLint for the buffer if the filetype includes 'javascript'.
+ let b:ale_linters = {'javascript': ['eslint'], 'html': ['tidy']}
+ " Use a List for the same setting. This will work in most cases.
+ let b:ale_linters = ['eslint', 'tidy']
+ " Disable all linters for the buffer.
+ let b:ale_linters = []
+ " Explicitly enable all available linters for the filetype.
+ let b:ale_linters = 'all'
+<
g:ale_max_buffer_history_size *g:ale_max_buffer_history_size*
@@ -1018,7 +1032,7 @@ g:ale_pattern_options *g:ale_pattern_options*
" Use just ESLint for linting and fixing files which end in '.foo.js'
let g:ale_pattern_options = {
\ '\.foo\.js$': {
- \ 'ale_linters': {'javascript': ['eslint']},
+ \ 'ale_linters': ['eslint'],
\ 'ale_fixers: ['eslint'],
\ },
\}