CLion 2023.3 Help

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):

    Function signature details with Doxygen comments
  • Inferred types:

    C++ inferred type in Quick Documentation popup
  • Copy/move details for structs and classes. In the example below, you can also refer to the TODO comments included in the popup:

    Copyability/movability of a struct/class
  • For a standard function, structure, or another item, the popup also includes a link to its cppreference:

    The link to external documentation
  • 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:

    Formatted macro expansion in Quick Documentation popup
  • Value and size of a constant expression evaluated at compile time:

    Values of constant expressions

    Compile-time evaluation is especially helpful for working with constexpr and consteval calculations and in template metaprogramming:

    Evaluated values
  • Enumeration values as integer:

    Enum values
  • 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:

    Quick doc in CMake completion

The popup menu

  • Click in the popup to change the font size, display the quick documentation toolbar, or go to the source code:

    Jump to Source in the documentation popup

View documentation in the tool window

With the default settings, pressing Ctrl+Q (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 the Show Options Menu icon and disable the Show Documentation Popup First option.

  • In the Documentation tool window, click the Show Options Menu 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.

  1. 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.

  2. 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.

    Keep Quick Documentation in 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.

Disable quick doc on mouseover

  • In the Settings dialog (Ctrl+Alt+S) , 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 Ctrl+Q or click View | Quick Documentation from the main menu.

Last modified: 11 February 2024