Skip to content
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

feat(core): matcher_spelling.rs and docs for matcher.rs (fix #558) #559

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jnd-au
Copy link

@jnd-au jnd-au commented Feb 2, 2025

Please see issue #558 for full context (Harper has spell check rules in both ./harper-core/src/linting/spell_check.rs and matcher.rs but the latter is undocumented and lacks a fine-grained configuration option to disable it, yet users may wish to disable it due to conflicts with their editors’ local/user spelling checker). This PR:

  1. Documents the spell check message in matcher.rs (“Did you mean”).
  2. Splits matcher.rs into spelling and non-spelling rules, using distinct messages that match the documentation.
  3. Adds a configuration option matcher_spelling so that the spelling rules in matcher.rs can be disabled while keeping its grammar rules enabled.

This is a small tactical workaround, not a perfect solution, as the hard-coded matcher.rs is to be removed in a future release. A minor residual inconvenience is that users who have configured matcher=false and spell_check=false (the existing options) will see matcher spelling messages until they set matcher_spelling=false too (the new option). However, given the absence of existing GitHub issues and PRs, few users may be currently impacted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant