diff options
author | Götz Christ <2220440+goetzc@users.noreply.github.com> | 2022-11-21 05:47:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-21 19:47:05 +0900 |
commit | ca355f4cb45ea3508548045ca7b9cc73f3741e69 (patch) | |
tree | f80d37a49fc27186b906f6be8e63b9bad7cade79 /ale_linters/markdown | |
parent | 4b433e5693ccec8e408504c4b139b8f7cc6a4aa3 (diff) | |
download | ale-ca355f4cb45ea3508548045ca7b9cc73f3741e69.zip |
Markdown: allow passing custom executable for markdownlint (#4358)
Diffstat (limited to 'ale_linters/markdown')
-rw-r--r-- | ale_linters/markdown/markdownlint.vim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ale_linters/markdown/markdownlint.vim b/ale_linters/markdown/markdownlint.vim index 7a293938..424c9f24 100644 --- a/ale_linters/markdown/markdownlint.vim +++ b/ale_linters/markdown/markdownlint.vim @@ -1,10 +1,15 @@ " Author: Ty-Lucas Kelley <tylucaskelley@gmail.com> " Description: Adds support for markdownlint +call ale#Set('markdown_markdownlint_executable', 'markdownlint') call ale#Set('markdown_markdownlint_options', '') +function! ale_linters#markdown#markdownlint#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'markdown_markdownlint_executable') +endfunction + function! ale_linters#markdown#markdownlint#GetCommand(buffer) abort - let l:executable = 'markdownlint' + let l:executable = ale_linters#markdown#markdownlint#GetExecutable(a:buffer) let l:options = ale#Var(a:buffer, 'markdown_markdownlint_options') @@ -14,7 +19,7 @@ endfunction call ale#linter#Define('markdown', { \ 'name': 'markdownlint', -\ 'executable': 'markdownlint', +\ 'executable': function('ale_linters#markdown#markdownlint#GetExecutable'), \ 'lint_file': 1, \ 'output_stream': 'both', \ 'command': function('ale_linters#markdown#markdownlint#GetCommand'), |