Expand description
Spellcheck analysis for Lex documents.
This module provides the core spellchecking logic, decoupled from
dictionary loading. Consumers provide a DictionaryProvider implementation
to handle dictionary source (filesystem, embedded, etc.).
§Architecture
The spellcheck system is split into two parts:
- Core logic (this module): Traverses documents, extracts words, checks spelling
- Dictionary provider (consumer-provided): Loads and caches dictionaries
This design allows the same checking logic to work in:
- Native LSP (filesystem-based dictionaries)
- WASM (embedded dictionaries)
- Tests (mock dictionaries)
Structs§
- Spellcheck
Result - Result of checking a document for spelling errors.
Traits§
- Word
Checker - A word checker that can verify spelling and suggest corrections.
Functions§
- check_
document - Check a document for spelling errors using the provided word checker.
- suggest_
corrections - Get spelling suggestions for a word.