[Emacs] Add lsp-ltex, add doc for writegood-mode

This commit is contained in:
Lucien Cartier-Tilet 2023-03-20 17:19:31 +01:00
parent 696c7cff3e
commit 97c74e22c0
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -6041,6 +6041,30 @@ in quite a few languages.
"p" #'langtool-show-message-at-point))
#+end_src
An LSP version of LanguageTools is also available:
#+begin_src emacs-lisp
(use-package lsp-ltex
:defer t
:straight (:build t)
:after lsp-mode
:hook (text-mode . lsp-deferred)
:init
(setq lsp-ltex-java-force-try-system-wide t
lsp-ltex-server-store-path nil
lsp-ltex-version (gethash "ltex-ls"
(json-parse-string
(replace-regexp-in-string
(rx "Picked" (* any) "\n")
""
(shell-command-to-string "ltex-ls -V"))))
lsp-ltex-check-frequency "save"
lsp-ltex-language "auto"
lsp-ltex-mother-tongue "fr"))
#+end_src
Finally, =writegood-mode= detects some simple general rules when writing
in English and can also calculate the Flesh-Kincaid levels of a
document.
#+begin_src emacs-lisp
(use-package writegood-mode
:defer t