summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-26 15:59:43 +0100
committerw0rp <devw0rp@gmail.com>2017-05-26 15:59:43 +0100
commitc77cf0e518e18b2e6f1f259c0f92e717d28c8998 (patch)
treee9a4c43ba79d0b0333c9c0d0f3f0177645388353 /doc
parent7fe1119cf1154480d8035a078ff06d6739892551 (diff)
downloadale-c77cf0e518e18b2e6f1f259c0f92e717d28c8998.zip
#371 Allow buffer variables to be set based on patterns
Diffstat (limited to 'doc')
-rw-r--r--doc/ale.txt35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/ale.txt b/doc/ale.txt
index ad488efd..bc632e21 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -517,6 +517,41 @@ g:ale_open_list *g:ale_open_list*
to `1`, in which case the window will be kept open until closed manually.
+g:ale_pattern_options *g:ale_pattern_options*
+
+ Type: |Dictionary|
+ Default: `{}`
+
+ This option maps regular expression patterns to |Dictionary| values for
+ buffer variables. This option can be set to automatically configure
+ different settings for different files. For example: >
+
+ let g:ale_pattern_options = {
+ \ '\.foo\.js$': {
+ \ 'ale_linters: {'javascript': ['eslint']},
+ \ },
+ \}
+<
+ The above example will match any filename ending in `.foo.js`, and use
+ only `eslint` for checking those files by setting `b:ale_linters`.
+
+ Filenames are matched with |match()|, and patterns depend on the |magic|
+ setting, unless prefixed with the special escape sequences like `'\v'`, etc.
+
+ The patterns can match any part of a filename. The absolute path of the
+ filename will be used for matching, taken from `expand('%:p')`.
+
+
+g:ale_pattern_options_enabled *g:ale_pattern_options_enabled*
+
+ Type: |Number|
+ Default: `!empty(g:ale_pattern_options)`
+
+ This option can be used for turning the behaviour of setting
+ |g:ale_pattern_options| on or off. By default, setting a single key
+ for |g:ale_pattern_options| will turn this option on.
+
+
g:ale_set_highlights *g:ale_set_highlights*
Type: |Number|