CLion 2024.1 Help


CLion indexes your project files to enable such features as finding usages, navigation, code completion, code generation, and refactorings.

Indexing is in progress

While indexing is in progress, the above-mentioned coding assistance features are unavailable or partially available.

Viewing the indexing process

The right part of the status bar shows the progress of the indexing process. You may select Show all to view the specific tasks in the Backround Tasks dialog.

Indexing is in progress

There are two main background tasks that are part of the indexing process: Scanning files to index and Updating indexes.

Indexing is in progress

In order to have access to smart IDE functionality such as code completion and smart navigation, the Updating indexes process must have completed. However, the Scanning files to index process can still be in progress because it does not interrupt the access to smart IDE functionality.

Decreasing time for indexing

The amount of time required for indexing varies depending on your project: the more complex your project is, the more files it comprises, the more time it takes to index it. You can decrease the indexing time by excluding files and folders.

Exclude from indexing

Your project may contain files for which you don't need the features which depend on indexing: for example, logs, binaries, or imported libraries.

In such cases, to reduce the indexing time, you can mark the files as plain text and directories as excluded or libraries.

Exclude a file from indexing

If you don't need specific files, but you don't want to completely remove them, you can temporarily exclude these files from the project. Excluded files are ignored by code completion, navigation, and inspections.

To exclude a file, you need to mark it as a plain text file. You can always return excluded files to their original state.

  1. Right-click a file in the Project tool window (Alt+1).

  2. Select Override File Type | Plain text.

    Plain text files are marked with the Plain text icon.

To revert the changes, right-click the file and select Revert File Type Override. from the menu.

    Exclude a directory from indexing

    If you don't want CLion to index a certain directory of your project, do the following:

    • In the Project tool window, right-click the directory you want to exclude and select Mark Directory as | Excluded:

      Mark directory as excluded

    Code generation, code completion, and refactorings won't be available for this directory. The files won't appear in search results unless you select this directory explicitly in the Find in Files dialog Ctrl+Shift+F. The directory is marked as excluded the Excluded directory icon.

    To include the directory back again, right-click it and select Mark Directory as | Cancel Exclusion.

    Exclude a library from indexing

    • In the Project tool window, right-click the directory with the library files, and select Mark Directory as | Library Files:

      Mark as library files

    Code generation, code completion and refactorings won't be available for this directory. However, you can make these files available in search results:

    • In Find in Files dialog Ctrl+Shift+F: narrow down your search by selecting the Project and Frameworks scope.

    • When searching everywhere (press twice): check Include non-project items or select Project and Frameworks from the list in the top right corner of the window.

    To unmark the directory, right-click it and select Mark Directory as | Unmark.

    Last modified: 28 May 2024