summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-04-24 21:48:33 +0100
committerw0rp <devw0rp@gmail.com>2018-04-24 21:48:33 +0100
commit41c0b837aec7770612274df1078ceddb6accd3f7 (patch)
tree7f6712e1b2fdfb7e017440b7c00e20f41824a160 /doc
parentebbf7d0353d9d5d3ecc42bddd50e270ba60e5243 (diff)
downloadale-41c0b837aec7770612274df1078ceddb6accd3f7.zip
#1278 Allow linters to be defined pretty much anywhere
Diffstat (limited to 'doc')
-rw-r--r--doc/ale.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/ale.txt b/doc/ale.txt
index 45d7ba1a..a20e9133 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -2359,6 +2359,21 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()*
containing `.` characters will be split into individual parts, and files
will be loaded for each filetype between the `.` characters.
+ Linters can be defined from vimrc and other files as long as this function
+ is loaded first. For example, the following code will define a Hello World
+ linter in vimrc in Vim 8: >
+
+ " Plugins have to be loaded first.
+ " If you are using a plugin manager, run that first.
+ packloadall
+
+ call ale#linter#Define('vim', {
+ \ 'name': 'echo-test',
+ \ 'executable': 'echo',
+ \ 'command': 'echo hello world',
+ \ 'callback': {buffer, lines -> map(lines, '{"text": v:val, "lnum": 1}')},
+ \})
+<
ale#linter#Get(filetype) *ale#linter#Get()*
@@ -2374,6 +2389,13 @@ ale#linter#Get(filetype) *ale#linter#Get()*
components.
+ale#linter#PreventLoading(filetype) *ale#linter#PreventLoading()*
+
+ Given a `filetype`, prevent any more linters from being loaded from
+ |runtimepath| for that filetype. This function can be called from vimrc or
+ similar to prevent ALE from loading linters.
+
+
ale#statusline#Count(buffer) *ale#statusline#Count()*
Given the number of a buffer which may have problems, return a |Dictionary|