Quick documentation
Available for: C/C++, Rust, Objective-C/C++, other supported languages, and CMake scripts.
Invoke: on hover or Ctrl0Q
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
:tip
Find out more in Code insight for CMake.
Click in the popup to change the font size, display the quick documentation toolbar, or go to the source code:
With the default settings, pressing Ctrl0Q (View | Quick Documentation) 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.
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 Ctrl0Q. If the popup appears, press Ctrl0Q 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.
To specify the delay in milliseconds after which the popup should appear, go to Settings | Editor | Code Editing | Editor Tooltips and enter the necessary value in the Tooltip delay field.
In the Settings dialog (CtrlAlt0S) , go to Editor | Code Editing | Quick Documentation 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 Ctrl0Q or click View | Quick Documentation from the main menu.
Thanks for your feedback!