languagetools: stop auto-appending --autoDetect (#2616)

Options are now configurable for languagetools, and `--autoDetect` can be removed by changing the options.
This commit is contained in:
Samuel Roeca
2019-09-12 16:22:47 -04:00
committed by w0rp
parent 34f2943fdd
commit 05ba522c9a
3 changed files with 20 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
" Description: languagetool for markdown files
"
call ale#Set('languagetool_executable', 'languagetool')
call ale#Set('languagetool_options', '--autoDetect')
function! ale#handlers#languagetool#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'languagetool_executable')
@@ -9,8 +10,10 @@ endfunction
function! ale#handlers#languagetool#GetCommand(buffer) abort
let l:executable = ale#handlers#languagetool#GetExecutable(a:buffer)
let l:options = ale#Var(a:buffer, 'languagetool_options')
return ale#Escape(l:executable) . ' --autoDetect %s'
return ale#Escape(l:executable)
\ . (empty(l:options) ? '' : ' ' . l:options) . ' %s'
endfunction
function! ale#handlers#languagetool#HandleOutput(buffer, lines) abort