From f3009bb94394f57904b8c64d867c3e941770848e Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Mon, 4 Apr 2022 09:30:21 +0200 Subject: [PATCH] languagetool: Find jar first On Debian, the languagetool command launches the gui, while on Gentoo it provides the command line interface. Hence, try to find the jar file first and resort to setting the cmd. --- plugins-noroot-nolowendbox.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins-noroot-nolowendbox.vim b/plugins-noroot-nolowendbox.vim index 32df579..2c14c20 100644 --- a/plugins-noroot-nolowendbox.vim +++ b/plugins-noroot-nolowendbox.vim @@ -220,7 +220,13 @@ EOF let g:detectspelllang_langs = {} let g:detectspelllang_langs.aspell =[ 'en_US', 'de_AT'] - let g:languagetool_cmd='languagetool' + " Try finding jar file. If it does not work, set cmd directly + let g:languagetool_jar='/snap/languagetool/current/usr/bin/languagetool-commandline.jar' + if !filereadable(g:languagetool_jar) + unlet! g:languagetool_jar + let g:languagetool_cmd='languagetool' + endif + au FileType mail let g:VimMailSpellLangs=['de', 'en'] let g:VimMailContactsProvider=['khard'] -- 2.30.2