Crates.io | skyspell |
lib.rs | skyspell |
version | 3.0.1 |
source | src |
created_at | 2021-06-12 14:33:53.504304 |
updated_at | 2024-12-07 18:01:26.471701 |
description | Fast and handy spell checker for the command line |
homepage | |
repository | https://github.com/your-tools/skyspell |
max_upload_size | |
id | 409356 |
size | 69,725 |
A fast and handy spell checker for the command line.
camelCase
, snake_case
identifiersHTTPError
fn
for .rs
), projects, or
relative path inside projectsCargo.lock
)image.svg
)You will need:
aspell-en
or hunspell-fr
).cargo
Then run:
$ cargo install skyspell
and make sure skyspell
is in your PATH
.
Run skyspell suggest helllo
, and check that the word hello
is suggested.
Usually, you will run skyspell check
to start an interactive session,
where you tell skyspell
how to handle all the errors it finds in your
project files:
$ skyspell check
LICENSE:9:2 Redistributions
What to do?
a : Add word to global ignore list
e : Add word to ignore list for this extension
...
x : Skip this error
q : Quit
> : a
=> Added 'Redistributions' to the global ignore list
foo.rs:32:2 fn
What to do?
a : Add word to global ignore list
e : Add word to ignore list for this extension
...
q : Quit
x : Skip this error
> : e
=> Added 'fn' to the ignore list for '.rs' files
Ignore rules will be automatically added to either:
skyspell-ignore.toml
, the local file, if the word is ignored for the project or for a path~/.local/share/skyspell/global.toml
, the global file, if the word is ignored globally
or for a given extension.That way you can share your ignore rules with other users, or back them up anyway you like.
Note that skyspell will honor XDG_DATA_DIR
when looking for the global file.
Note that by default, skyspell will try to read every file in the project, or if the project is using git, every file not ignored by git. This may include for instance binary files.
To prevent skyspell from trying to read those files, create a
skyspell-ignore.toml
file at the root of your project containing
something like this:
patterns = [
"Cargo.lock",
"logo.png ",
]
I've borrowed heavily from scspell - both for the implementation and the command line behavior.
Note that scspell does not depend on Enchant and so can not check Languages other than English, and also cannot offer suggestions for spell errors.
But it's implementation is simpler and does not require to install a spell provider.
On the other hand, scspell can apply replacements in a file automatically,
a feature skyspell
does not have.
To build faster and run the tests faster, you can use