typos¶
typos is a fast, low-dependency spellchecker written in Rust. It checks source code and markdown documents for typos and spelling errors.
Installation¶
You can download pre-compiled binaries from the GitHub releases page, or install it using a package manager.
Config¶
Typos is configured via a config file. In this repository, the config file is _typos.toml, which is auto-generated by a Python script from dictionary.txt.
Do NOT edit _typos.toml directly
Any custom words should be added to dictionary.txt (one word per line, sorted alphabetically). The config file _typos.toml must be regenerated afterwards.
Dictionary File¶
Add allowed words to dictionary.txt. Remember to sort the dictionary after editing:
Config Generation¶
Before running the spellchecker, regenerate the configuration:
Usage¶
Task Tasks¶
1. Run spellcheck globally
2. Run spellcheck on a specific file
3. Sort the custom dictionary file
CLI Commands¶
1. Run spellcheck on the current directory
2. Run spellcheck on a specific file