reddit / emacs

Need Help With Langtool

RevTomJohnson · 2022-03-17 23:41
I installed langtool for grammar check on emacs but I don’t think I have my settings right in init file. If I try to check a buffer with M-x langtool-check I get “langtool jar file is not readable.” I tried following guide on github but it seems unclear to me. ???
DeepDay6 · 2022-03-18 10:59
What does your config look like? I use the following, and it works flawlessly. (use-package! langtool :init (setq langtool-language-tool-jar "~/.nix-profile/share/langtool-command-line.jar") (setq langtool-language-tool-server-jar "~/.nix-profile/share/languagetool-http-server.jar") (setq langtool-server-user-arguments '("-p" "8082")) (setq langtool-http-server-host "localhost") (setq langtool-http-server-port 8082)) (use-package! flycheck-languagetool :hook (text-mode . (lambda () (require 'flycheck-languagetool))) :init (setq flycheck-languagetool-server-jar "~/.nix-profile/share/languagetool-server.jar") (setq flycheck-languagetool-server-port "8082") (setq flycheck-languagetool-language "en-GB")) Of course, you'll have to adapt the ports, language and paths to the .jar-files accordingly. And if you don't use DOOM-Emacs, you need to use `use-package` instead `use-package!`, without the exclamation mark.
tech_addictede · 2022-03-19 15:35
You can also check lsp-ltex.