-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a way to combine dictionary processing across packages #628
Comments
This should already be the case. There are few different places that Vale searches: vale/internal/check/spelling.go Lines 199 to 209 in c0107e7
|
What would be your expectation for the case where a word doesn't appear in any of the dictionaries? In other words, there will be multiple rules (Style1.Rule, Style2.Rule, ...) reporting the same error. |
In that scenario, it would be acceptable for every style that provides dictionaries to report an error. That's vastly superior to the current situation where a word defined in one style's dictionary but not in another style's dictionary causes an error. Ideally, Vale would recognize that the error repeats across styles and reports a single error. It might be helpful to report in the error all of the styles providing dictionaries so that the user can decide which dictionary to update. I recognize those would violate the way Vale currently reports errors, so I leave that up to you. |
I've created a proposal (#688) for how I'd like to solve this: essentially, packages could contribute dictionaries to be consumed by This handles both cases:
Feel free to let me know what you think. |
I like the proposal and agree that it should solve both problems. |
This is out now. |
Check for existing issues
Describe the feature
I've started using Vale packages. Since a package can contain a
Spelling.yml
style, providing the Hunspell dictionaries alongside the style files in the package would be convenient.When multiple packages define spelling styles, each style's spellchecks are evaluated independently. If a word like
xyzzy
is spelled correctly according to the dictionary in style B, spellchecking with style A flags the word as misspelled.It would be great if all the dictionaries defined by all active styles could be processed together.
Related, it would be great if
dicpath
was relative to theSpelling.yml
file or to theStylesPath
instead of relative to wherevale
was executed. I recognize that this could be a breaking change, so perhaps adictpath
key could be introduced to handle the style-relative path, and usingdicpath
anddictpath
together would be considered an error.A style-relative
dictpath
would make it much easier to provide a style package that included its dictionaries and was agnostic to wherevale
is executed.The text was updated successfully, but these errors were encountered: