summaryrefslogtreecommitdiff
path: root/ale_linters/asciidoc
diff options
context:
space:
mode:
authorMartino Pilia <martino.pilia@gmail.com>2019-02-02 15:45:32 +0100
committerMartino Pilia <martino.pilia@gmail.com>2019-02-02 16:20:14 +0100
commit771581a945c677a96ccb33f17c8892de42a5e939 (patch)
tree5c81fd8e21eb45e1089c73696e1489d4bd5dba39 /ale_linters/asciidoc
parent4d426bf2873c6e1cd2c71e478c756903307628d3 (diff)
downloadale-771581a945c677a96ccb33f17c8892de42a5e939.zip
Add settings for the Alex linter
The executable for the Alex linter is currently hard-coded as 'alex', which is an issue given the fact that it conflicts with the Haskell lexer generator, whose executable is also called 'alex', has been around a dozen years before the linter, and is packaged in the official repositories of the major Linux distributions. This commit adds options to use a local executable for the alex linter (which is a node package), and an option to set a custom executable. As side changes: * The pattern in the alex handler is made more readable by turnig it into a very-magic regex. * Alex handles plain text, markdown, and HTML. Specific flags for HTML and markdown are provided when instantiating the linters for the respective filetypes, while before those formats were treated as plain text.
Diffstat (limited to 'ale_linters/asciidoc')
-rw-r--r--ale_linters/asciidoc/alex.vim9
1 files changed, 1 insertions, 8 deletions
diff --git a/ale_linters/asciidoc/alex.vim b/ale_linters/asciidoc/alex.vim
index 79b04fc3..97976b2c 100644
--- a/ale_linters/asciidoc/alex.vim
+++ b/ale_linters/asciidoc/alex.vim
@@ -1,11 +1,4 @@
" Author: Johannes Wienke <languitar@semipol.de>
" Description: alex for asciidoc files
-call ale#linter#Define('help', {
-\ 'name': 'alex',
-\ 'executable': 'alex',
-\ 'command': 'alex %s -t',
-\ 'output_stream': 'stderr',
-\ 'callback': 'ale#handlers#alex#Handle',
-\ 'lint_file': 1,
-\})
+call ale#handlers#alex#DefineLinter('asciidoc', '--text')