tree-sitter-grammars / tree-sitter-markdown

Markdown grammar for tree-sitter
MIT License
379 stars 45 forks source link

Add support for c++ as a valid language identifier along with cpp #40

Closed ad-chaos closed 2 years ago

ad-chaos commented 2 years ago

Currently in a md file, these is what the cplusplus code blocks look like:

Screenshot 2022-06-11 at 7 29 32 PM

Some projects use c++ instead of cpp to mark cplusplus code blocks, it would be nice if that was recognised as well. I would've made a PR, but I am not well acquainted with the ways of tree-sitter, hence filing an issue.

Thanks!

MDeiml commented 2 years ago

I assume you are using neovim? This issue should better be discussed in the nvim-treesitter repo. The tree-sitter-markdown grammar just marks all the elements of the markdown file. It can't actually change how languages are injected. nvim-treesitter does the actual work for that, so feel free to open an issue there.

ad-chaos commented 2 years ago

Oh sorry, thanks for pointing me in the right direction!