Closed mycf closed 1 year ago
See also my answer to the other issue you opened https://github.com/MDeiml/tree-sitter-markdown/issues/103#issuecomment-1604258943
I looked a bit into the neovim api. The main problem is that the code_span
node is part of the "markdown_inline"
grammar, so the following would work for example
vim.treesitter.query.parse("markdown_inline", [[ (code_span) @codespan ]])
But this obviously wouldn't check if the code_span
is inside a paragraph and would also return code spans that are for example in a heading. Not sure if that is a problem?
Also you will have to make sure to call it on the markdown_inline
tree and not the markdown
tree. Let me know if you need any other help.
Code not working