jupyterlab-contrib / spellchecker

Spellchecker for JupyterLab notebook markdown cells and file editor.
BSD 3-Clause "New" or "Revised" License
202 stars 20 forks source link

Easy disable toggle (perhaps via language selector?) #109

Open athewsey opened 2 years ago

athewsey commented 2 years ago

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

Nice work! I'm just getting started with this extension really, but I notice that while spellchecking in text/markdown file editor is sometimes helpful... Other times I have text-like files (like logs, etc) where the spellcheck highlights are distracting and not really useful.

I think it might be useful to have an easy way to disable spellchecking (whether for the session as a whole or one open file in particular) and then later turn it back on.

Describe the solution you'd like

The first place I looked when coming across this was the language selector button in the bottom toolbar, so for a session-level control I think adding a "disable" option to the dialogue this opens could be a good option? If the toolbar button said something like "Spellchecker Disabled" instead of the selected language when turned off, this could be a good visible reminder for users to turn it back on when needed.

Describe alternatives you've considered

Maybe it'd be more useful in some ways if spellcheck could be disabled for particular open files (to prevent users forgetting and leaving it turned off when later editing notebooks/markdown they cared about)? But I assume this'd be significantly more complex to integrate...

I know there's file MIME type based filtering, but as mentioned the problem is I find spellchecking is sometimes useful for files detected as text/plain and sometimes not.

Additional context

Interested to hear if other people would find this useful too or I just have weird files/workflows 😅

krassowski commented 1 year ago

Thanks for the suggestion! I think that this is a good idea. I am happy to review a pull request/help with a draft PR but I would not have time to work on it myself in near future.