summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorSamuel Roeca <samuel.roeca@gmail.com>2019-09-12 16:22:47 -0400
committerw0rp <w0rp@users.noreply.github.com>2019-09-12 21:22:47 +0100
commit05ba522c9af59aaf0d34aff2674c2ac273dc1a88 (patch)
tree3aeb4ee91be58cfb99b36e6d85e4a8f46a381b5a /autoload
parent34f2943fddddb8943456ec8defb2080592845ec7 (diff)
downloadale-05ba522c9af59aaf0d34aff2674c2ac273dc1a88.zip
languagetools: stop auto-appending --autoDetect (#2616)
Options are now configurable for languagetools, and `--autoDetect` can be removed by changing the options.
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/handlers/languagetool.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/autoload/ale/handlers/languagetool.vim b/autoload/ale/handlers/languagetool.vim
index 10e049df..73974ceb 100644
--- a/autoload/ale/handlers/languagetool.vim
+++ b/autoload/ale/handlers/languagetool.vim
@@ -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