valentjn / vscode-ltex

LTeX: Grammar/spell checker :mag::heavy_check_mark: for VS Code using LanguageTool with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://valentjn.github.io/ltex
Mozilla Public License 2.0
817 stars 29 forks source link

Disable ltex with command #480

Open melsophos opened 2 years ago

melsophos commented 2 years ago

Note: Per the contribution guidelines, deleting parts of the template or not filling in vital information may result in the issue to be immediately closed as invalid.

Is your feature request related to a problem? Please describe.

My computer is a bit old and the CPU a bit slow. Hence, when vscode is opened with ltex activated, most of the CPU is eaten by ltex. It becomes quite hard to use the computer for anything else, and often there is even some lagging when typing. Even after stopping to write/save in vscode for several minutes, the computer stays slow and a lot of CPU is used by a java process.

Describe the solution you'd like

Have a command to disable ltex completely.

Describe alternatives you've considered

There is a command "Activate ltex" but it does not seem that it stops ltex when already activated. I have also enabled "check on save only" but this is not sufficient to prevent ltex using a lot of CPU all the time.

Additional context

valentjn commented 2 years ago

You can disable LTEX with ltex.enabled (also works with magic comments).

Alternatively, you can set ltex.checkFrequency to manual. Then, you can run checks manually by using commands such as LTeX: Check Current Document.

melsophos commented 2 years ago

Thanks for the advice, I will check this!

Edit: Just to confirm that it works well: in the manual setting, ltex properly stops running after it's done.

melsophos commented 2 years ago

I am reopening the issue because it seems that even with the "manual" settings ltex is running with opening vscode. I have a very large bibtex file which ltex tried to parse for more than 10 min with java using 300% of my cpu.

I have removed bibtex from the list of languages to check, but it is inconvenient to know that ltex may run a long check when starting (also because the computer is so slow, it's hard to do anything), and there is no option to stop it once it runs.