Open sadid opened 6 years ago
I know it's pretty late to answer this. This error also occurred on my part. I'm using archlinux as well.
I found a workaround which implies that you have to change some things in the LanguageTool.vim
script.
The script uses the .jar file, which, if I try to use it in any shell, it will also throw these errors. The languagetool
binary however works fine. To use it I changed the l:languagetool_cmd
as followed:
let l:languagetool_cmd = 'languagetool'
\ . ' -c ' . s:languagetool_encoding
\ . (empty(s:languagetool_disable_rules) ? '' : ' -d '.s:languagetool_disable_rules)
\ . (empty(s:languagetool_enable_rules) ? '' : ' -e '.s:languagetool_enable_rules)
\ . (empty(s:languagetool_disable_categories) ? '' : ' --disablecategories '.s:languagetool_disable_categories)
\ . (empty(s:languagetool_enable_categories) ? '' : ' --enablecategories '.s:languagetool_enable_categories)
\ . ' -l ' . s:languagetool_lang
\ . ' --api ' . l:tmpfilename
\ . ' 2> ' . l:tmperror
Now it is directly calling the binary without using the g:languagetool_jar
variable. After this, it'll work properly.
It would be nice to have an option to change this without having to edit the script. In addition, it is only possible to check grammar for only one language at the same time. To change this, you must change the variable g:languagetool_lang
, which can be tedious, when you are working between files with multiple languages.
It seems like this plugin is great but not fully matured. I would rather try out grammarous to see, if they accomplish this.
I've installed
languagetool
system-wide through my pacman manager. Thelanguagetool-commandline.jar
is located in/usr/share/java/languagetool/languagetool-commandlne.jar
and I've set (in .vimrc):But when I issue the :LanguageToolCheck I get this error:
OS: Archlinux latest Vim: 8.0.1176-1 languagetool: 3.8.1 vim-languagetool: lastest