question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doxygen highlighting

See original GitHub issue

I used to do set syntax=cpp.doxygen in vim which would give me nice highlighting for doxygen documentation comments, but with Treesitter this doesn’t work anymore. Would it be possible in theory to include highlighting rules for doxygen comments into tree-sitter-cpp?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
tom-anderscommented, Aug 5, 2021

@theHamsta No you’re right, there should be a separate parser for doxygen, since it could also be used by other languages (C, Java etc.). I have some time on my hands right now and could try to write a parser. I think would be the best reference for getting started?

Maybe I can also use https://github.com/tree-sitter/tree-sitter-jsdoc as a reference.

1reaction
maxbrunsfeldcommented, May 21, 2021

I think we’d probably want to solve this by making a specific grammar just for Doxygen, and then parsing C++ comments using that grammar, via language injection. I’m not familiar with the details of how language injection works in Neovim, but I think there is support for it.

/cc @tjdevries @vigoux @theHamsta

Read more comments on GitHub >

github_iconTop Results From Across the Web

Markdown support - Doxygen Manual
For languages supported by doxygen you can also make the code block appear with syntax highlighting. To do so you need to indicate...
Read more >
Highlight Doxygen comments in Emacs, including code blocks
Advanced highlighting package for Doxygen comments. In addition to highlighting Doxygen commands and their arguments, entire Doxygen comment are highlighted ...
Read more >
How to make Doxygen do syntax highlighting in @code ...
Does anyone have any suggestions for how to achieve syntax highlighting for XML code fragments? (And while on the topic, where can I...
Read more >
DoxyGen Syntax - DoxyGen Highlighting on top of c/c++/java
package script version date Vim version user doxygen.zip 1.15 2005‑12‑12 6.0 Michael Geddes doxygen.zip 1.14 2005‑10‑27 6.0 Michael Geddes doxygen.zip 1.12 2005‑01‑27 6.0 Michael Geddes
Read more >
Efficient Doxygen syntax highlighting? : r/vim - Reddit
I maintain some code that uses Doxygen for code documentation, and would really like to see syntax highlighting for things like @param and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found