
-
As far as I know there is currently no treesitter parser for Doxygen style comments. There is a language agnostic comment parser that is supported by nvim-treesitter that will highlight things like TODO: and NOTE: in comments. Until this recent commit nvim-treesitter provided a query for this parser that highlighted @ text in comments. It was meant to highlight a reference to a user but it doubled as a doxygen tag highlight for me for a while. I just noticed that this query has been removed and I'm not sure why but you can add it as a custom query in your Neovim config. I have yet to try this so you'll have to refer to the Neovim treesitter docs for where to add the query.
-
Nutrient
Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers. Other PDF SDKs promise a lot - then break. Laggy scrolling, poor mobile UX, tons of bugs, and lack of support cost you endless frustrations. Nutrient’s SDK handles billion-page workloads - so you don’t have to debug PDFs. Used by ~1 billion end users in more than 150 different countries.
-
Hey folks, I've been trying to get nvim to highlight the documentation in my codebase. In particular I want keywords like the ones below highlighted in a different colour (@brief, etc). I'm aware there is something similar to this in vim here https://github.com/vim-scripts/DoxyGen-Syntax/tree/master, but to my understanding treesitter disables vim syntax matching and highlighting. Anyone know of a solution?
-
As far as I know there is currently no treesitter parser for Doxygen style comments. There is a language agnostic comment parser that is supported by nvim-treesitter that will highlight things like TODO: and NOTE: in comments. Until this recent commit nvim-treesitter provided a query for this parser that highlighted @ text in comments. It was meant to highlight a reference to a user but it doubled as a doxygen tag highlight for me for a while. I just noticed that this query has been removed and I'm not sure why but you can add it as a custom query in your Neovim config. I have yet to try this so you'll have to refer to the Neovim treesitter docs for where to add the query.
-
Lastly, neovim now supports semantic token highlighting which uses semantic tokens from LSP servers to provide even better, language specific highlighting. Some LSP servers support semantic tokens for doc comments. The lua language server is a good example. Unfortunately, if you're using a language like C or C++, the language servers do not provide semantic tokens for comments because doxygen style comments are not specific to those languages so you might be out of luck for semantic token highlighting.
-
No perfect answer but hopefully that helps break things down a bit. Maybe a treesitter parser for doxygen comments could be created similar to this one for jsdoc.
-
Not sure for Java (that’s Java right?), but for Python I inject rst in docstring comments. See here for my config.