PillFall / languagetool.el

LanguageTool suggestions integrated within Emacs
GNU General Public License v3.0
98 stars 8 forks source link

Is it possible to only use the http langtool server? How can I debug LanguageTool returned with status 1 #5

Closed contra-bit closed 3 years ago

contra-bit commented 3 years ago

I start my languagetool on boot with systemd.

LanguageTool returned with status 1

Jun 24 16:41:04 NAME languagetool[49404]: WARN  o.l.language.LanguageIdentifier Cannot consider noopLanguages because not in fastText mode: [en, de]

These are the only error messages I have recived

PillFall commented 3 years ago

Yeah, you can use a standalone or already created HTTP Server. You only need to config the URL and Port. There is no need to start the server from Emacs. This was solved in v0.4.0.

In your .emacs you only need to add:

(setq languagetool-server-url "http://whateverlocation") ;; without trailing forward slash

(setq languagetool-server-port 8081) ;; The port to the server.
;; If you access through http://localhost/api/v2/check for example. This should be set to 80

Then you can check the buffer using languagetool-server-mode

P.S. If you are having trouble with the init of LanguageTool Server from systemd. I suggest you to post a issue in LanguageTool GitHub page (link)

PillFall commented 3 years ago

As I get no response and this must be invalid (you are referring to the behavior of LanguageTool itself, not to the Emacs package). I'm going to close and mark the issue as invalid.

telenieko commented 1 year ago
(setq languagetool-server-url "http://whateverlocation") ;; without trailing forward slash

(setq languagetool-server-port "8081") ;; The port to the server.
;; If you access through http://localhost/api/v2/check for example. This should be set to 80

Note that the port has to be a number:

(setq languagetool-server-url "http://whateverlocation") ;; without trailing forward slash
(setq languagetool-server-port 8081) ;; The port to the server.

Otherwise, you will be greeted with:

languagetool-server-mode-on: Format specifier doesn’t match argument type