CLion 2024.1 Help

Project settings

Project settings apply to the current project only. They are stored in the .xml format together with other project files in the .idea directory. Project settings can include VCS configuration, code style options, the list of language inspections, and other settings.

Access project settings

  1. Press Ctrl+Alt+S to open the IDE settings.

  2. The settings that apply only to the current project are marked with the Project settings icon.

    the Settings dialog

Default settings for new projects

You can configure project settings not only for the current project, but for all projects that you will create later. For example, you can set particular CMake profiles as default for all new projects.

Access default settings for new projects

  • In the main menu, go to File | New Projects Setup | Settings for New Projects.

Share project settings through VCS

Project settings are stored in the project directory as a set of XML files under the .idea folder. This folder contains both user-specific settings that shouldn't be placed under version control and project settings that are normally shared among developers working in a team, for example, the code style configuration.

When you enable version control in your project, CLion automatically moves the workspace.xml file with your personal settings to the .gitignore list to avoid conflicts with other developers' settings.

Configuration files are processed according to your choice. Once you modify the project settings, and a new configuration file is created, the IDE shows a notification at the bottom of the screen prompting you to select how you want to treat configuration files in this project:

  • View files: view the list of created configuration files and select, which of them you want to place under version control. After that, the selected files will be scheduled for addition to VCS.

  • Always Add: silently schedule all configuration files created in the .idea directory for addition to VCS (applies only to the current project).

  • Don't Ask Again: never schedule configuration files for addition to VCS; they will have the unversioned status until you manually add them to VCS (applies only to the current project).

If you close the notification without selecting any option, it will appear again after a new configuration file is created. The new file will also go to the list that will be there until you select one of the options even if you restart the IDE.

Notification prompting to select how to treat configuration files

List of non-shareable configuration files

CLion identifies configuration files and adds them to the list of ignored files automatically. However, if you are sharing your project manually, we recommend that you avoid placing these files and folders under version control:

  • .idea/workspace.xml

  • .idea/usage.statistics.xml

  • .idea/dictionaries folder

  • .idea/shelf folder

For the full list of files, refer to How to manage projects under Version Control Systems and JetBrains.gitignore.

Copy global settings to the project level

Global (IDE) settings are stored separately from projects. That is why these settings are not shared through version control together with the project.

Some settings, however, can be copied to the project level. For example, you can create a copy of your code style configuration or inspection profiles. If you do so, the IDE creates the corresponding configuration files in the .idea directory that you can share together with the project through VCS.

CLion also provides several ways of sharing settings between different IDE instances. For more information, refer to Share IDE settings.

Last modified: 28 June 2024