Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/emacs-languagetool/flymake-languagetool

Flymake support for LanguageTool
https://github.com/emacs-languagetool/flymake-languagetool

checker emacs flymake languagetool

Last synced: 7 days ago
JSON representation

Flymake support for LanguageTool

Awesome Lists containing this project

README

        

README.html

License: GPL v3
MELPA
MELPA Stable

flymake-languagetool

Flymake support for LanguageTool.

CI

Installation

The instruction to use this plugin.


  1. Download LanguageTool from https://languagetool.org/download/ and
    extract on to your local machine (skip this step if using a remote
    server).

  2. Consider adding the following snippet to your configuration.

```el
(use-package flymake-languagetool
:ensure t
:hook ((text-mode . flymake-languagetool-load)
(latex-mode . flymake-languagetool-load)
(org-mode . flymake-languagetool-load)
(markdown-mode . flymake-languagetool-load))
:init
;; Remote server config with LanguageTool’s free API
;; (setq flymake-languagetool-url “https://api.languagetool.org”)
;; (setq flymake-languagetool-server-port nil)
;; (setq flymake-languagetool-server-jar nil)

;; Local server config
(setq flymake-languagetool-server-jar “path/to/LanguageTool-X.X/languagetool-server.jar”))
```


  1. :tada: Done! Now open a text file and hit M-x flymake-mode!

otherwise you can call flymake-languagetool-maybe-load like the snippet below.

el
(add-hook 'find-file-hook 'flymake-languagetool-maybe-load)

Configuration


  • flymake-languagetool-server-jar

  • flymake-languagetool-active-modes

  • flymake-languagetool-check-spelling


  • flymake-languagetool-language (Default "en-US")

Spellchecking

LanguageTool’s spellchecking is disabled by default. If
flymake-languagetool-check-spelling is non-nil LanguageTool will check
for spelling mistakes.

Disabling Rules

Specific rules can be disabled using
flymake-languagetool--disabled-rules. For example, LanguageTool’s
whitespace rule can be a bit verbose in org-mode and it can be
disabled by adding its ID to this variable.

el
(push "WHITESPACE_RULE" flymake-languagetool--disabled-rules)

The full list of rules and their IDs can be found here.

You can also disable rules using..

Corrections

Suggestions from LanguageTool can be applied with:

flymake-languagetool-correct: select error in current buffer with
completing read

flymake-languagetool-correct-at-point: correct error at point

flymake-languagetool-correct-dwim: if point is on a
flymake-languagetool error then correct; otherwise, select one
from the current buffer.

Categories

By default, flymake-languagetool will now provide LanguageTool
category information for each identified error. If you wish to disable
this behavior, you can set flymake-languagetool-use-categories = nil.

Contribute

PRs Welcome
Elisp styleguide
Donate on paypal
Become a patron

If you would like to contribute to this project, you may either
clone and make pull requests to this repository. Or you can
clone the project and establish your own branch of this tool.
Any methods are welcome!