I am installing the vim-scripts/LanguageTool
plugin using Vundle:
Plugin 'vim-scripts/LanguageTool'
in .vimrc
;:PluginInstall
in a vim file (and Vundle
says "Done").However, when I run :LanguageToolCheck
, I got the following error:
LanuageTool cannot be found at: /home/MY-USE-NAME/languagetool-2.4.1/languagetool-commandline.jar.
You need to install LanguageTool and/or set up g:languagetool_jar to indicate the location of the languagetool-commandline.jar file.
What should I do? Thanks.
The Docs installs the LanguageTool plugin as follows:
$ mkdir ~/.vim
$ cd ~/.vim
$ unzip /path-to/LanguageTool.zip
$ vim -c 'helptags ~/.vim/doc'
Solution:
According to Docs, this plugin needs a standalone LanguageTool for desktop which includes the required languagetool_commandline.jar
. Install it and set g:languagetool_jar
according to the answer below.
It seems you need to link the path to the langagetool
within vim, so it can find it and use it.
In vim you can define/set variables with the following command:
let g:languagetool_jar="/path/to/the/file.jar"
The g:
means that the variable is global and thus accessible from every script/plugin. In that case, it means that the LanguageTool
will know where to find the jar file.