CLion 2023.2 Help

Indexing

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.

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 Control+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 Control+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: 27 September 2023