diff options
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 = [] |