Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/emacs-languagetool/flymake-languagetool
- Owner: emacs-languagetool
- License: gpl-3.0
- Created: 2021-04-02T17:06:07.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-01T08:52:24.000Z (about 1 month ago)
- Last Synced: 2025-01-01T09:25:48.922Z (about 1 month ago)
- Topics: checker, emacs, flymake, languagetool
- Language: Emacs Lisp
- Homepage:
- Size: 380 KB
- Stars: 39
- Watchers: 5
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.html
- License: LICENSE
Awesome Lists containing this project
README
README.html
flymake-languagetool
Flymake support for LanguageTool.
Installation
The instruction to use this plugin.
- Download LanguageTool from https://languagetool.org/download/ and
extract on to your local machine (skip this step if using a remote
server).- 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”))
```
- :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
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!