From d95d63da934d4d7781a51acc08841eabb70f82f8 Mon Sep 17 00:00:00 2001 From: James Ravn Date: Tue, 28 Apr 2020 11:22:43 +0100 Subject: [PATCH] Fix langtool config for Linux Fixes https://github.com/hlissner/doom-emacs/issues/2072. I have left the mac portion alone as I don't have a mac handy to test this. --- modules/checkers/grammar/config.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/checkers/grammar/config.el b/modules/checkers/grammar/config.el index 58a505fb5..f972eaa61 100644 --- a/modules/checkers/grammar/config.el +++ b/modules/checkers/grammar/config.el @@ -8,15 +8,16 @@ :init (setq langtool-default-language "en-US") :config (unless (or langtool-bin - langtool-language-tool-jar) - (setq langtool-language-tool-jar - (cond (IS-MAC + langtool-language-tool-jar + langtool-java-classpath) + (cond (IS-MAC + (setq langtool-language-tool-jar (locate-file "libexec/languagetool-commandline.jar" (doom-files-in "/usr/local/Cellar/languagetool" :type 'dirs - :depth 2))) - (IS-LINUX - "/usr/share/java/languagetool/languagetool-commandline.jar"))))) + :depth 2)))) + (IS-LINUX + (setq langtool-java-classpath "/usr/share/languagetool:/usr/share/java/languagetool/*"))))) ;; Detects weasel words, passive voice and duplicates. Proselint would be a