From 771581a945c677a96ccb33f17c8892de42a5e939 Mon Sep 17 00:00:00 2001 From: Martino Pilia Date: Sat, 2 Feb 2019 15:45:32 +0100 Subject: 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. --- doc/ale.txt | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ale.txt b/doc/ale.txt index 006928ef..0ca64af9 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -20,7 +20,8 @@ CONTENTS *ale-contents* 5.6 Symbol Search.....................|ale-symbol-search| 6. Global Options.......................|ale-options| 6.1 Highlights........................|ale-highlights| - 6.2 Options for write-good Linter.....|ale-write-good-options| + 6.2 Options for alex Linter...........|ale-alex-options| + 6.3 Options for write-good Linter.....|ale-write-good-options| 7. Integration Documentation............|ale-integrations| ada...................................|ale-ada-options| gcc.................................|ale-ada-gcc| @@ -2219,7 +2220,29 @@ ALEWarningSign *ALEWarningSign* ------------------------------------------------------------------------------- -6.2. Options for write-good *ale-write-good-options* +6.2. Options for alex *ale-alex-options* + +The options for the alex linter are global because it does not make sense to +have them specified on a per-language basis. + +g:ale_alex_executable *g:ale_alex_executable* + *b:ale_alex_executable* + Type: |String| + Default: `'alex'` + + See |ale-integrations-local-executables| + + +g:ale_alex_use_global *g:ale_alex_use_global* + *b:ale_alex_use_global* + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + +------------------------------------------------------------------------------- +6.3. Options for write-good *ale-write-good-options* The options for the write-good linter are global because it does not make sense to have them specified on a per-language basis. -- cgit v1.2.3