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

How to make spell-fu work with tree-sitter-hl? #64

Closed
loafofpiecrust opened this issue Oct 18, 2020 · 3 comments
Closed

How to make spell-fu work with tree-sitter-hl? #64

loafofpiecrust opened this issue Oct 18, 2020 · 3 comments
Labels
documentation Improvements or additions to documentation question Not a bug report or feature request

Comments

@loafofpiecrust
Copy link

loafofpiecrust commented Oct 18, 2020

If I enable tree-sitter-hl-mode in a buffer, it gets highlighted correctly and my TODO and NOTE items still get highlighted (by the hl-todo minor mode) but the misspelled words in the buffer lose their red underline from spell-fu-mode. Related to #45?

@shackra shackra added the bug Something isn't working label Oct 18, 2020
@ubolonton
Copy link
Collaborator

This is probably unrelated to #45, as spell-fu-mode seems to use overlays.

@ubolonton
Copy link
Collaborator

ubolonton commented Oct 22, 2020

spell-fu relies on spell-fu-faces-include, which defaults to '(font-lock-comment-face font-lock-doc-face font-lock-string-face). It probably needs a more generic mechanism to specify regions to spell-check. For now, this should be enough:

(setq-default spell-fu-faces-include
              '(tree-sitter-hl-face:comment
                tree-sitter-hl-face:doc
                tree-sitter-hl-face:string
                font-lock-comment-face
                font-lock-doc-face
                font-lock-string-face))

@ubolonton ubolonton added documentation Improvements or additions to documentation question Not a bug report or feature request and removed bug Something isn't working labels Oct 22, 2020
@ubolonton ubolonton changed the title In tree-sitter-hl-mode, spell-fu underlines are gone How to make spell-fu work with tree-sitter-hl? Oct 22, 2020
@loafofpiecrust
Copy link
Author

That seems to do the trick, thanks!

@shackra shackra closed this as completed Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Not a bug report or feature request
Projects
None yet
Development

No branches or pull requests

3 participants