Doxygen-style comments can be placed across the source code and used for generating full-fledged documentation in various formats. In case you have a project documented this way, you can easily run Doxygen tool from the built-in terminal in CLion to get the documentation. Besides, CLion enables you to get more value out of the Doxygen comments inside the IDE itself.
CLion includes the information from the Doxygen-styled comments into the Quick Documentation popup Ctrl+Q:
Doxygen-styled information is included in Quick Documentation popup in addition to the type information. To invoke the documentation popup:
Place the caret at the desired symbol or at the
@paramcommand of the Doxygen comment.
Alternatively, when the checkbox Show quick documentation on hover ( ) is selected, just move your mouse pointer over the desired symbol.
If function parameters are documented separately from the function description, CLion will merge all the comments and show you the full function’s signature documentation (the same way as Doxygen does when generating the output):
Creating comments from scratch
To create a Doxygen comment from scratch:
Type one of the following symbols:
/*!and press Enter.
You will get a stub to fill with the documentation text:
While renaming a function or its parameters, the Doxygen comments need to be updated accordingly. In case of the Rename refactoring Shift+F6, CLion updates Doxygen comments along with other references.
Note that not all the commands are available in the completion. Here you can find the list of the commands that are currently unsupported.
Rendered view for Doxygen comments
With CLion, Doxygen comments can be shown in an easier-to-read format. In this Rendered View mode, items are shown grouped by their tags, while the tags themselves are skipped.
Note the rendered view limitations:
Opening the referenced web pages is not available.
EOL block comments are rendered only if they start the line.
Toggle and configure the rendered view
To enter the Rendered View mode, hover the mouse pointer over a comment and click in the gutter or press Ctrl+Alt+Q. The icon turns into .
To quit the Rendered View mode, click in the gutter, or select Toggle Rendered View from the context menu of a Doxygen comment, or press Ctrl+Alt+Q.
To turn on the Rendered View mode for all Doxygen comments in the current file, select Render All Doc Comments from the context menu in the gutter.
If necessary, select Adjust Font Size from the context menu and change the font size using the slider.
To show all Doxygen comments rendered by default, open the Settings/Preferences dialog Ctrl+Alt+S, go to , and select the Render documentation comments checkbox.
To hide the Rendered View gutter icons, select Configure Gutter Icons from the context menu in the gutter and then clear the Documentation comments in-place rendering checkbox on the page that opens.
Doxygen comments colors
To configure the colors that are used in Doxygen comments, go toand open the node: