feat: spellcheck input
Yesterday evening, I wanted to experiment how Hunspell would work in Chatterino. I discovered that it's not that much effort to get spell checking to work.
This is a minimal implementation of spell checking. Dictionaries must be saved as index.aff and index.dic in Dictionaries/ (next to Settings/). You can find dictionaries here (this collects some from various sources).
Features
- Toggle checking for all inputs in the settings
- Toggle checking for one input via context menu
- Apply suggestions via context menu (even when spellchecking is disabled)
- Works with undo/redo
- Emotes are ignored
Missing Features (might be cool to have this in the future)
- Currently, it's bring-your-own-dictionary. It would be cool if Chatterino could install dictionaries.
- Chatterino could try to access system dictionaries
- You can't switch the language per split right now.
- Custom dictionaries would be great (and "Add to dictionary").
- The spellchecker should be able to reload.
One thing I dislike is that QSyntaxHighlighter is synchronous, meaning it reruns every time a character is typed. Technically, you could hack around that by ignoring its requests to highlight a block and manually call rehighlight (at some timer tick, for example).
Closes #16.
5 wrz 2025 18:59:05 nerix @.***>:
One thing I dislike is that QSyntaxHighlighter is synchronous, meaning it reruns every time a character is typed. Technically, you could hack around that by ignoring its requests to highlight a block and manually call rehighlight (at some timer tick, for example). That doesn't seem all that bad. In my experience other programs already behave this way. Ideally I would want the timer to be rather low. I believe most programs currently have this rehighlight timer set WAY too high.
probably needs to ignore the leading @mention in replies
Ideally we should ignore names of people in the chat not just the leading @username for replies
I'm fine if this PR doesn't achieve everything we want for a spellcheck input in one go Ignoring mentions seems good for a followup PR Running on a timer instead of each key input seems good for a followup PR
Feature-wise, I feel like we should aim to be only one of "bring your own dictionary" or "supply dictionaries" to start.