Expand description
Native OS spell-check: NSSpellChecker on macOS, ISpellChecker on Windows.
Two operations, deliberately split:
SpellChecker::checkfinds the misspelled spans in a string (each a UTF-8 byte range into it). This is cheap and local, so a host can run it on every edit.SpellChecker::suggestionsreturns replacement suggestions for a single word. On macOS this is a synchronous XPC call to the system spell service, so it’s kept separate and meant to run lazily — e.g. only when the user right-clicks a flagged word — never in a per-keystroke loop.
On a platform with no system speller (currently Linux) both are no-ops, so
callers don’t need their own cfgs. Host-agnostic: plain &str and byte
ranges in, no gpui dependency.
Structs§
- Spell
Checker - A handle to the host OS spell-checking service.