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

No code_span nodes after latest update #45

Open
Galicarnax opened this issue Jun 27, 2022 · 4 comments
Open

No code_span nodes after latest update #45

Galicarnax opened this issue Jun 27, 2022 · 4 comments

Comments

@Galicarnax
Copy link

After I synced neovim's packer, it updated the markdown parser, and it stopped working for me, since I use code_span and code_span_delimiter nodes in my custom queries. On another machine, where I did not update, I see with the TSPlayground that these nodes are there, but with updated parser, they are just gone. Is it intentional, and your parser will not recognize code spans like this one any more?

@MDeiml
Copy link
Collaborator

MDeiml commented Jun 27, 2022

The parser was split into two grammars. You need to install the markdown_inline grammar as well. Your queries regarding code_span belong in the queries/markdown_inline folder. You can edit them using e.g. :TSEditQuery highlights markdown_inline. Sorry for the confusion.

@MDeiml
Copy link
Collaborator

MDeiml commented Jun 27, 2022

I hope that answered your question, but I'll leave this open since other people probably will experience similar problems.

@Galicarnax
Copy link
Author

Yes, installing markdown_inline solved it. Thanks!

@msvechla
Copy link

Thanks, I had the same issue. The following nvim-treesitter config fixed it for me:

parser_config.markdown = {
  install_info = {
    url = "https://github.com/MDeiml/tree-sitter-markdown",
    files = { "tree-sitter-markdown/src/parser.c", "tree-sitter-markdown/src/scanner.cc" },
  },
  filetype = "markdown",
}

parser_config.markdown_inline = {
  install_info = {
    url = "https://github.com/MDeiml/tree-sitter-markdown",
    files = { "tree-sitter-markdown-inline/src/parser.c", "tree-sitter-markdown-inline/src/scanner.cc" },
  },
  filetype = "markdown",
}

@amaanq amaanq unpinned this issue Feb 13, 2024
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

3 participants