jsmestad / spacemacs-langtool

A spacemacs layer for LanguageTool integration
5 stars 0 forks source link

spacemacs fails to find languagetool layer #1

Open bnicenboim opened 4 years ago

bnicenboim commented 4 years ago

This looks like a great layer. But I can't make it work. Is there something I should be doing besides adding it to dotspacemacs-configuration-layers? I'm using the latest dev version of spacemacs

clwgg commented 4 years ago

Could you share how it 'doesn't work'? Error messages or the like? Also, did you install the LanguageTool package to your system?

bnicenboim commented 4 years ago

I've installed the desktop version of https://www.languagetool.org/ and in fact https://github.com/justintaft is working fine.

When I add languagetool to the dotspacemacs-configuration-layers I get the following:

* Running tests on [[file:/home/bruno/.spacemacs][/home/bruno/.spacemacs]] (v0.0)

* Testing settings in dotspacemacs/layers [[file:/home/bruno/.spacemacs::dotspacemacs/layers][Show in File]]
** TEST: Each path in [[file:/home/bruno/.spacemacs::dotspacemacs-configuration-layer-path][dotspacemacs-configuration-layer-path]] is a string
** TEST: Each path in [[file:/home/bruno/.spacemacs::dotspacemacs-configuration-layer-path][dotspacemacs-configuration-layer-path]] exists in filesystem
** TEST: Each layer in [[file:/home/bruno/.spacemacs::dotspacemacs-configuration-layers][dotspacemacs-configuration-layers]] can be found
*** FAIL: languagetool
*** PASS: html
*** PASS: javascript
*** PASS: python
*** PASS: yaml
*** PASS: ess
*** PASS: auto-completion
*** PASS: emacs-lisp
*** PASS: git
*** PASS: helm
*** PASS: markdown
*** PASS: multiple-cursors
*** PASS: spell-checking
*** PASS: treemacs
** RESULTS: [[file:/home/bruno/.spacemacs::dotspacemacs/layers][dotspacemacs/layers]] passed 13 out of 14 tests
clwgg commented 4 years ago

hmm, I'm not sure. One thing I had to do was to include the path to the languagetool *.jar files, like so:

(languagetool :variables
              langtool-java-classpath "/usr/share/languagetool:/usr/share/java/languagetool/*")

Does that help?

bnicenboim commented 4 years ago

I've tried this:

 (languagetool :variables
                   langtool-java-classpath "/.langtool/LanguageTool-4.8/*")

And it doesn't work, as a reference, the following works fine:

 ;; langtool: https://github.com/justintaft/jt-emacs-langtool/tree/httpserver
  (setq langtool-java-bin "java")
  (load-file "~/.emacs.d/private/jt-langtool.el")
  (require 'jt-langtool)
  (setq langtool-language-tool-commandline-jar "~/.langtool/LanguageTool-4.8/languagetool-commandline.jar")
  (setq langtool-language-tool-jar "~/.langtool/LanguageTool-4.8/languagetool.jar")
  (setq langtool-enabled-rules '("And"))
  (setq langtool-disabled-rules '("WHITESPACE_RULE" "EN_QUOTES"))  (setq langtool-default-language "en-US")