diff options
author | w0rp <devw0rp@gmail.com> | 2018-03-26 09:55:18 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2018-03-26 09:55:18 +0100 |
commit | 8b34a4bf6b837e1ce7e060b053ec8abedd20cdb1 (patch) | |
tree | e7c52160edf51308d968ce3dcccfded3229a1bc2 /autoload | |
parent | 45c5fe7f43d85513943202e620f9a751cfc534fc (diff) | |
download | ale-8b34a4bf6b837e1ce7e060b053ec8abedd20cdb1.zip |
Fix config and executable issues with the textlint linter
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/handlers/textlint.vim | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/autoload/ale/handlers/textlint.vim b/autoload/ale/handlers/textlint.vim index 80f68e10..c06daa01 100644 --- a/autoload/ale/handlers/textlint.vim +++ b/autoload/ale/handlers/textlint.vim @@ -13,23 +13,16 @@ function! ale#handlers#textlint#GetExecutable(buffer) abort endfunction function! ale#handlers#textlint#GetCommand(buffer) abort - let l:cmd_path = ale#path#FindNearestFile(a:buffer, '.textlintrc') + let l:executable = ale#handlers#textlint#GetExecutable(a:buffer) + let l:config = ale#path#FindNearestFile(a:buffer, '.textlintrc') let l:options = ale#Var(a:buffer, 'textlint_options') - if !empty(l:cmd_path) - return 'textlint' - \ . ' -c ' - \ . l:cmd_path - \ . (!empty(l:options) ? ' ' . l:options : '') - \ . ' -f json %t' - endif - - return 'textlint' + return ale#node#Executable(a:buffer, l:executable) \ . (!empty(l:options) ? ' ' . l:options : '') + \ . (!empty(l:config) ? ' -c ' . ale#Escape(l:config) : '') \ . ' -f json %t' endfunction - function! ale#handlers#textlint#HandleTextlintOutput(buffer, lines) abort let l:res = get(ale#util#FuzzyJSONDecode(a:lines, []), 0, {'messages': []}) let l:output = [] |