doomemacs
doomemacs copied to clipboard
feat(grammar): add `+lsp` flag to enable `lsp-ltex`
Enable fast grammar checking using lsp-ltex
, which provides integration with the LTeX LS, this last uses LanguageTool to correct grammar. This is way faster and responsive than the currently used langtool
package.
In addition, LTeX LS understands many formats and languages (like Org, Markdown, LaTeX...), so it produces less false positives related to the language keywords, tags, or commands.
The configuration can be used enabling +lsp
for the grammar
module.
Example Org document after enabling :checkers (grammar +lsp)
- [x] I searched the issue tracker and this hasn't been PRed before.
- [x] My changes are not on the do-not-PR list for this project.
- [x] My commits conform to the git conventions.
Is there a way to make this work when composing an email with mu4e?
Is there a way to make this work when composing an email with mu4e?
@numkem In general, LSP servers try to load an entire workspace, which doesn't works with mails. I didn't dig deeper to figure out a workaround.
You can use flycheck-languagetool
as an alternative, you can take a look at my config, you will find a configuration example there.
Hi!
I just discovered the eglot counterpart for lsp-ltex
called eglot-lsp
(https://github.com/emacs-languagetool/eglot-ltex).
What do you think?
Is it worth include it in this PR or it could be in a future one?
Thanks.
When using ltex-ls with eglot, you don't actually need the mentioned 3rd party package. You can just call:
(set-eglot-client! 'text-mode '("ltex-ls"))
Anybody know how to make it work in programming mode?
Disclaimer: I may be sharing outdated information here!
While there is nothing wrong with using it in prog-mode, I don’t think neither lsp-mode nor eglot support using multiple servers per file. And you would most likely want a server for the language you are editing rather than one for just the text bits.