CLion 2024.2 Help

JavaScript documentation look-up

CLion shows you reference for standard JavaScript APIs, for symbols from your project and from its dependencies, as well as for symbols defined in external libraries. You can view the documentation for symbols in the Documentation popup and open documentation on external sites if links to them are available.

  • For a project symbol or for a symbol from the project dependencies, CLion generates the documentation from the corresponding JSDoc comment.

  • For a standard JavaScript object or method, CLion shows the corresponding JSDoc comment from the built-in TypeScript definition files d.ts. These files are bundled with CLion and updated on a regular basis.

  • If no comment is found in the d.ts files, CLion shows a summary from the corresponding MDN article.

By default, documentation is shown in the Documentation popup but you can always open it in the Documentation tool window or even configure it to appear in the Documentation tool window by default.

Quick Documentation in a popup

  • Hover over the necessary symbol in the editor.

  • Place the caret at the symbol and press Ctrl+Q or select View | Quick Documentation from the main menu.

    Press Ctrl+Q again to open this documentation in the Documentation> tool window.

  • Click the Show Options Menu icon in the popup to change the font size, display the quick documentation toolbar, or go to the source code.

Click the Show Options Menu icon in the popup to change the font size, display the quick documentation toolbar, or go to the source code.

MDN documentation for symbols

  • In the Documentation popup Ctrl+Q, click the link at the bottom:

    ws_mdn_docs.png
  • Press Shift+F1 or select View | External Documentation from the main menu.

CLion opens the MDN article in the default CLion browser.

Documentation for third-party JavaScript libraries

  1. Download the required library or framework, configure it as an external JavaScript library, and specify the link to its external documentation. For more information, refer to Configuring a custom third-party JavaScript library.

  2. Place the caret at the symbol and press Shift+F1 or choose View | External Documentation from the main menu.

Documentation for npm packages

  • In a package.json file or in a require or import statement, place the caret at the name of the package and press Ctrl+Q

    Quick Doc for an npm package is opened from an import statement
    Quick Doc for an npm package is opened from a package.json
  • To open the documentation on the npm official website in the browser, click the link in the popup or press Shift+F1.

Last modified: 08 October 2024