Skip to content

Spell checker improvements #1541

@fxha

Description

@fxha

Description

General spell checker improvements:

  • Improve Hunspell download dictionary UX
  • Enable language detection in another thread using node Web Workers for Hunspell (and Windows API). Until then we disabled the feature for Hunspell (and Windows API) but also when spelling mistakes are not underlined on macOS. This is currently blocked due to an Electron upstream bug.
  • Add an option to force language detection when loading a new tab with markdown content when using Hunspell. Otherwise language is only detected when the user types words.
  • Add native Windows spell checker

node-spellchecker native library:

  • Allow to change spell check provider at runtime (rebase from atom upstream).
  • Run node-spellchecker asynchronous in threads to get better performance (rebase from atom upstream).
    Note to self: Does this give any benefits? On larger documents spell checking takes approximately 10-15ms without cache and 1-5ms with cache hits. What are the performance advantages from filter a list of words in JS, copy the remaining misspelled words to C++, create a new thread and check all words at once vs. check each word of the list - copy each word after filtering if needed.
  • Update Hunspell library from Chromium upstream becasue the used version is 6 years old.

Open questions:

  • Should we enable Windows native spell checking API for wider language support on Windows 10? I think it was disabled due to problem with the API/crashes.
  • Is it possible to check for spelling only when the user stopped typing? I guess it's currently not possible due to Electron API?

Known issues:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions