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

Documentation on how to set up spell checking #520

Open
Dietr1ch opened this issue Oct 21, 2024 · 2 comments
Open

Documentation on how to set up spell checking #520

Dietr1ch opened this issue Oct 21, 2024 · 2 comments

Comments

@Dietr1ch
Copy link
Contributor

It seems that hunspell is not that easy to get working (#159 sort of complains about it)

I can't get hunspell to work either, it simply skips all files, so I'm guessing that it might be good to have an example on how to use hunspell too.

# https://devenv.sh/reference/options/#pre-commit
pre-commit = {
  hooks = {
    # Spelling
    hunspell = {
      enable = true;
    };
  };
};

After some fooling around I ended up with,

env = {
  DICTIONARY = "en_GB";
};

pre-commit = {
  hooks = {
    # Spelling
    hunspell = {
      enable = true;
      description = "Run hunspell on all org files";
      files = "\.org$";
      entry = "${pkgs.hunspell}/bin/hunspell -p .spelling/dictionary -l";
    };
  };
};

That -l flag made me trip, as it's key and without it hunspell runs in interactive mode and results in a busy wait when running pre-commit run --all-files --show-diff-on-failure.

@sandydoo
Copy link
Member

What was the original issue in your case? .org files being filtered out by default or something else?

@Dietr1ch
Copy link
Contributor Author

Yeah, org files were not checked by default, but I also wanted to specify the personal dictionary as things like file.json trip spellchecking.

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

No branches or pull requests

2 participants