Open ehuss opened 1 year ago
It's a missing feature, to interactively modify the dictionary. Happy to review a PR to enhance the UI on it.
@ehuss I'd really appreciate a PR on the docs from a first-time user and what would have helped you to avoid you tripping up issue to issue.
@ehuss Thank you for your details post. I was able to get it working
> cat .config/spellcheck.toml
[Hunspell]
use_builtin = true
skip_os_lookups = false
search_dirs = [ "." ]
extra_dictionaries = [ "spellcheck.dic" ]
> cat .config/spellcheck.dic
1000
config
tx
I would like to confirm that the current config setup is not ideal.
How to add words interactively?
I'm trying to figure out how to add words to a dictionary (or at least to ignore the same word). Most spell checkers I am used to have an "Add to Dictionary" option or an "Ignore" option that will ignore the same word for the rest of the document. None of the options in the
cargo spellcheck fix
menu seem to provide that:How to manually set up a dictionary?
Assuming it doesn't support adding words automatically, I tried several things to set up a custom dictionary. However, I found several roadblocks.
.config/spellcheck.toml
with the contents:Got error:
0: Could not find extra dictionary spelling.txt in any of the search paths
Tried
extra_dictionaries = ["./spelling.txt"]
, go the same error.Tried with an absolute path, got
0: Failed to find any en_US.dic / en_US.aff in any search dir or no search provided
After lots of messing around, figured out that creating a table disabled the default settings, so I had to add:
Got an error:
I thought the extra dictionaries would be a "personal dictionary" according to the hunspell docs, which says it should be a text file with words. But apparently it is a
.dic
file. I added a random number at the top of the file, and was able to progress.However, now after each word, I have to stop, edit the file, restart
cargo spellcheck
(which takes a long time to start up).I think I am missing something fundamental, or maybe I am very confused?