Quick documentation
Quick Documentation popup helps you get more information on a code element at caret. CLion shows quick documentation in a popup on mouseover automatically. Depending on the element you invoke it for, the popup can include:
Function signature details and code documentation (either regular or Doxygen comments):
Inferred types:
Copy/move details for structs and classes. In the example below, you can also refer to the TODO comments included in the popup:
For a standard function, structure, or another item, the popup also includes a link to its cppreference:
Macro replacements to help you better understand and debug nested macros (like Boost.Test or Catch macros).
In the popup, you will see the final macro replacement properly formatted, with highlighted strings and keywords:
Value and size of a constant expression evaluated at compile time:
Compile-time evaluation is especially helpful for working with
constexpr
andconsteval
calculations and in template metaprogramming:Enumeration values as integer:
CMake code elements
In CMake scripts, CLion shows documentation for variables, commands, properties, modules, and policies. For example, you can view quick documentation for completion suggestions in
find_package
:
The popup menu
Click in the popup to change the font size, display the quick documentation toolbar, or go to the source code:
View documentation in the tool window
With the default settings, pressing Ctrl+Q (
) opens quick documentation in a popup. You can change the settings to view documentation in the tool window.In the quick documentation popup, click and disable the Show Documentation Popup First option.
In the Documentation tool window, click the icon on the tool window toolbar and disable the Show Documentation Popup First option.
Keep documentation in the tool window
You can open a piece of documentation for a specific code element in the tool window and keep viewing documentation for other elements in your current file.
Place the caret at the required code element and press Ctrl+Q. If the popup appears, press Ctrl+Q again to switch to the tool window.
The asterisk symbol (
*
) on the documentation tab means that the tab is not pinned, so its content will be replaced by documentation for another code element that you select in the editor.Right-click the tab with the documentation in the documentation tool window and enable the Keep This Documentation option.
After that, the current documentation tab will be pinned. You can return to the editor and view documentation for other code elements that will open either in the popup or in a new tab in the tool window.
Specify the popup delay
To specify the delay in milliseconds after which the popup should appear, go to Tooltip delay field.
and enter the necessary value in the
Disable quick doc on mouseover
In the Settings dialog (Ctrl+Alt+S) , go to and clear the Show quick documentation on hover checkbox.
You can also click in the popup and disable the Show on Mouse Move option.
In this case, to view documentation for a symbol at caret, press Ctrl+Q or click
from the main menu.