vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Feature Request — Support for doxygen Documentation

Open alexdima opened this issue 9 years ago • 50 comments

Moved from Microsoft/vscode#25231 From @rei-vilo


Doxygen provides a very nice way of adding documentation to the code thanks to keywords.

Some IDEs support Doxygen natively and display the documentation related to the function being typed in.

capture 2017-04-24 a 16 35 56 capture 2017-04-24 a 16 35 30

alexdima avatar Apr 25 '17 09:04 alexdima

@Bernd-L I am using an alternative syntax parser (Reloaded C/C++ with Reloaded Themes), hope it usable.

LeThiHyVong avatar Aug 22 '18 01:08 LeThiHyVong

@LeThiHyVong Yes, I've been using it too, however, it still lacks Doxygen-command auto-completion (=IntelliSense). Also, it can't display a popover-like bubble with the documentation of a method. (or something else).

The functionality described above really needs to be implemented into the Microsoft C++ plugin.

Tanja-4732 avatar Aug 22 '18 06:08 Tanja-4732

Bumping this. I noticed VS Code at least places the documentation comments into the info popup for a method (albeit unformatted it looks like). It would be really slick to see them formatted.

Also of note is that some documentation blocks are formatted like this:

////////////////////////////////////////////////////////////  
/// \brief Retrieve the color as a 32-bit unsigned integer  
/// \return Color represented as a 32-bit unsigned integer  
////////////////////////////////////////////////////////////

SFML uses this style for instance: https://github.com/SFML/SFML

VS Code doesn't parse this into the info popup at all it seems since it's not in a /** */ block, however it seems to be one of the recommended styles in the doxygen manual, so maybe the extension could look for any comment block that has @keyword or \keyword above a declaration. http://www.doxygen.nl/manual/docblocks.html

rewrking avatar Dec 20 '18 17:12 rewrking

Is there any active branch for this feature to contribute to?

mklemarczyk avatar Aug 16 '19 12:08 mklemarczyk

No, it's in our closed source code. Stuff that could be contributed to in the TypeScript could be found in the list https://github.com/Microsoft/vscode-cpptools/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22 .

sean-mcmanus avatar Aug 17 '19 02:08 sean-mcmanus

I'm glad to see this is already in the pipeline. Although I generally prefer C# XML style documentation (not surprising since I work primarily in C#), as I begin working on C++ projects I am finding Doxygen in heavy usage everywhere. Having Intellisense recognize it will make my work much easier.

BlueG avatar Dec 12 '19 07:12 BlueG

++ waiting for it (in visual studio as well)

w3lld0ne avatar Apr 30 '20 14:04 w3lld0ne

+1 on this feature request

rfzeg avatar May 03 '20 20:05 rfzeg

There are 25 people subscribed to this, please add a reaction to the top post instead of +1ing (and thus notifying everyone waiting for this). Cheers. :pray:

jurf avatar May 05 '20 12:05 jurf

happy to see the status change to "In Progess"

ousugo avatar May 26 '20 05:05 ousugo

Finally in progress. Can’t wait any longer.

zhouzq-thu avatar Jun 15 '20 11:06 zhouzq-thu

Leaving it open, but in "fixed (release pending" state until we release it.

bobbrow avatar Jun 22 '20 22:06 bobbrow

Example of Doxygen comments displayed on tooltip by the C/C++ extension:

image image

michelleangela avatar Jun 23 '20 18:06 michelleangela

If you would like for the C/C++ extension to also generate stub Doxygen comments, please upvote the "Feature request - Doxygen stub generation" at https://github.com/microsoft/vscode-cpptools/issues/5683. Votes on features will help determine a feature's priority against other features or work items.

michelleangela avatar Jun 24 '20 22:06 michelleangela

Doxygen comment support in hover, signature help, and completion is available now with https://github.com/microsoft/vscode-cpptools/releases/tag/0.29.0-insiders .

sean-mcmanus avatar Jun 25 '20 01:06 sean-mcmanus

Works awesome so far! I'm now spending an evening documenting my code... any plan to add support for @tparam (template parameters) though?

rewrking avatar Jun 25 '20 03:06 rewrking

Great! Minor detail, our code-base uses the Qt-Style exclamation mark docblocks (/*! instead of /**), and the exclamation mark is shown in the hover.

ben-edna avatar Jun 25 '20 06:06 ben-edna

Fantastic! Another small detail - documentation block after members show /<, !< or < depending on chosen syntax. https://www.doxygen.nl/manual/docblocks.html#memberdoc

ebinans avatar Jun 25 '20 17:06 ebinans

Works awesome so far! I'm now spending an evening documenting my code... any plan to add support for @tparam (template parameters) though?

The work to support @tparam is in progress.

michelleangela avatar Jun 25 '20 17:06 michelleangela

Great! Minor detail, our code-base uses the Qt-Style exclamation mark docblocks (/*! instead of /**), and the exclamation mark is shown in the hover.

The work to support Qt-Style exclamation mark /*! is in progress.

michelleangela avatar Jun 25 '20 17:06 michelleangela