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

We have configured Doxygen to use \par instead of \param, can that somehow also be supported (probably through some setting?). Also, for some reason we put our Doxygen comments in between the function signature and the opening {. Doxygen parses that just fine ... will that work here as well?

Boddlnagg avatar Jun 25 '20 17:06 Boddlnagg

We have configured Doxygen to use \par instead of \param, can that somehow also be supported (probably through some setting?). Also, for some reason we put our Doxygen comments in between the function signature and the opening {. Doxygen parses that just fine ... will that work here as well?

@Boddlnagg , I created a new issue for your feature request at #5700

michelleangela avatar Jun 25 '20 17:06 michelleangela

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

@ebinans , I created a new issue for your feature request at #5701

michelleangela avatar Jun 25 '20 17:06 michelleangela

Is it possible to leave the commands that are not being converted? We use \note, \pre, and \post. The current behavior is that they don't show up in the tool tip at all.

jhortenstine avatar Jun 26 '20 18:06 jhortenstine

We sometimes use the \copydoc to not duplicate documentation when it is not needed. It would be great if the documentation of the mentioned symbol would be used for the tooltip.

ben-edna avatar Jul 02 '20 08:07 ben-edna

Looks great! Just one little detail.

We trim trailing whitespace in our source files, so if a doxy-comment is split in two lines then there is no space between the last word on the first line and the first word on the second line.

/**
 * Comment in
 * correct format
 */

becomes Comment incorrect format instead of Comment in correct format.

carlolars avatar Jul 03 '20 08:07 carlolars

@carlolars What's the repro for that space issue? I'm not reproing it.

image

sean-mcmanus avatar Jul 06 '20 21:07 sean-mcmanus

@carlolars What's the repro for that space issue? I'm not reproing it.

It happens for functions if it has @return and/or @param, the examples below are failing for me.

/**
 * Comment in
 * correct format.
 *
 * @param arg1
 * @return int
 */
int func1(int arg1)
{
    return arg1;
}

/**
 * Comment in
 * correct format.
 *
 * @return int
 */
int func2(void)
{
    return 2;
}

/**
 * Comment in
 * correct format.
 *
 * @param arg1
 */
void func3(int arg1)
{
    (void)arg1;
}

carlolars avatar Jul 07 '20 14:07 carlolars

@carlolars @sean-mcmanus I was able to repro the issue on Visual Studio. image

Edit: I created a new issue #5741 for this and filed an issue on Visual Studio.

michelleangela avatar Jul 07 '20 20:07 michelleangela

Only doxygen comments above function definition are parsed and shown over tooltip. Comments above function declaration are ignored.

Is there any setting which decides this?

magdumnikhil avatar Jul 17 '20 12:07 magdumnikhil