tree-sitter-grammars / tree-sitter-markdown

Markdown grammar for tree-sitter
MIT License
411 stars 52 forks source link

Integration with spellcheck #105

Closed UtkarshVerma closed 11 months ago

UtkarshVerma commented 1 year ago

Currently, if I enable spellcheck, then my code blocks, anchors and other syntax elements are also spellchecked, which is not expected.

As with other treesitter parsers, setting syntax enable should only spellcheck items which are non-syntax. But this doesn't work with this parser currently. Seeing this supported would help a lot as Markdown is the go-to filetype for writing documents, and spellcheck is a necessary aid.

MDeiml commented 1 year ago

I guess you're using neovim? This is not something that can be changed in this repo but rather in nvim-treesitter.

It seems somebody already implemented some support for this, but some elements (codeblocks, ...) are not excluded correctly. You can change this by making a pull request adding the @nospell capture to the corresponding nodes here and here.

MDeiml commented 11 months ago

Closing this, as more related to neovim rather than this specific parser.