Konfekt/vim-langtool

E117: Unknown function: langtool#langtool

Closed this issue · 3 comments

abers commented

Although I have set langtool_jar when I try running :LangTool I receive the following error:

Error detected while processing /home/user/.config/nvim/plugged/vim-langtool/autoload/lan
gtool.vim:
line    4:
To use the LanguageTool compiler, please set either g:langtool_cmd to the path of an executab
le that starts LanguageTool in command-line, or set g:langtool_jar to the path of languagetoo
l-commandline.jar!
To use the LanguageTool compiler, please set either g:langtool_cmd to the path of an executab
le that starts LanguageTool in command-line, or set g:langtool_jar to the path of languagetoo
l-commandline.jar!
E117: Unknown function: langtool#langtool

I've tried both -
let g:langtool_jar = '$HOME/Applications/LanguageTool/languagetool-commandline.jar'
and
let g:langtool_jar = '~/Applications/LanguageTool/languagetool-commandline.jar'

The location is definitely correct as -

let g:languagetool_jar = '$HOME/Applications/LanguageTool/languagetool-commandline.jar'

works for vim-languagetool.

Hey, please excuse me for my late reply (somehow I wasn't subscribed to this repo and thus not notified).

Could you try

let g:languagetool_jar = $HOME . '/Applications/LanguageTool/languagetool-commandline.jar'

?

Could you also check whether the jar file is readable?

I can confirm. Neither of your paths work, but that proposed does.

Should work out of the box now. Thank you for reporting!