stsewd / tree-sitter-comment

Tree-sitter grammar for comment tags like TODO, FIXME(user).
https://stsewd.dev/tree-sitter-comment/
MIT License
134 stars 9 forks source link

Highlighting of doxygen like comments #30

Closed arminveres closed 1 year ago

arminveres commented 1 year ago

Hi there, at some point in the past few months the highlighting of @param, @brief etc. stopped working, so it looks like regular comments now. After researching a bit, I traced it back to this tree sitter highlighter, please correct me, if I am wrong. Is there a fix for it?

stsewd commented 1 year ago

Hi, those highlights were provided by nvim-treesitter, they were meant to highlight user mentions actually, but they were removed since they collided with other parsers (jsdoc, luadoc, etc) https://github.com/nvim-treesitter/nvim-treesitter/commit/f9cfd40c08e1a505e728271a57960c387a9bf8f5.

For highlighting those, a new dedicated parser for doxygen is needed, see https://github.com/tree-sitter/tree-sitter-cpp/issues/116#issuecomment-893316088. I did a quick search, and it doesn't look like there is a parser yet. Alternative, you can add the removed queries in your config by extending the query file, see :h treesitter-query.

arminveres commented 1 year ago

Thanks a lot, sorry for the confusion!