-
-
Notifications
You must be signed in to change notification settings - Fork 8
Description
First of all, thank you for the initiative to publish lsp-ltex that I have just discovered.
I take the initiative to open this issue because I tested lsp-ltex with a text-mode hook (which includes org-mode) and I noticed that lsp-ltex (or LanguageTool) cannot deal well when a file got a too many (~2653) of errors as shown below.
At each "edit" (can also be for each save) of the file, lsp-ltex contacts LanguageTool with all the content of this file, which takes time and heats up my CPU. To avoid this issue, maybe it would be nice to propose to the user a variable to limit the use of LanguageTool for a file that contains a number of errors reaching a certain threshold. In other words, if lsp-ltex would encounters a file that exceeds a certain number of errors, then it should does nothing or disables itself.
If you wondering, this is the config of lsp-ltex that I use.
(use-package lsp-ltex
:hook (text-mode . lsp-deferred)
:custom
(lsp-ltex-enabled t)
(lsp-ltex-mother-tongue "fr"))It is also possible that I can work around this problem by creating my own function that I hook and blacklist some files manually. However, probably an abstract solution to the user would be better.
