spellsitter.nvim
spellsitter.nvim copied to clipboard
How to enable support for spell checking inside a heredoc string
Hello and thank you for this plugin! Finally have spelling up and running in all its glory with treesitter enabled. Appreciate it.
I noticed that misspelled words inside of a heredoc block are not being picked up.

I'm not sure if this would be a feature of spellsitter.nvim
or meant to be implemented/enabled somewhere else but I thought I would start here. If I need to be pointed elsewhere any help is appreciated! Thanks.
It'll just be a case of improving the current queries in https://github.com/lewis6991/spellsitter.nvim/blob/master/queries/rst/spell.scm.
That file basically just says exactly where to apply spell checking.
Thanks for the quick reply. I had a look at: https://github.com/lewis6991/spellsitter.nvim/blob/master/queries/ruby/spell.scm
(comment) @spell
(string_content) @spell
I am not sure where comment
and string_content
are sourced from ... I'm going to have to look into how all this works and figure out if maybe there is a way to identify a heredoc_string
or something. All of this is new to me.
Thanks for the pointer.
You can use https://github.com/nvim-treesitter/playground to see what the parsed AST is for a file. That will show you comment
and string_content
.
The guide on treesitter queries is also useful: https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries