How do I exclude directories from being indexed in CLion?
I have several GB of data being indexed that are slowing everything down.
In PyCharm I can just right-click on the directory, but I don't find this option on CLion.
To be more concrete, I have a project with the following structure:
release/
release/results
source/
build/
the directory release/results
contains several GB of data. CMakeList.txt
only contains the list of files inside source/
, however, the indexer is indexing the files inside release/results
.
As of CLion 1.5 (EAP for now), you can mark directories as either 'source', 'libraries' or 'excluded'.
See the full blog post describing the new feature:
Although CLion automatically excludes build directories from indexing, some users expect wider options. The same situation can happen when some folders are too big or located on network storage, making their indexing too expensive. To let CLion know that this is the case, you may want to manually exclude folders from indexing.
Excluding a whole directory isn't possible, however you can exclude files by file type.
Preferences | Editor | File types
Beware that these settings aren't persisted after updating CLion to a newer version (at least this was the case for me when updating from 1.05 to 1.1).
It's possible! It would help if you changed in .idea/YourProject.iml content block:
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/public/bundles" />
<excludeFolder url="file://$MODULE_DIR$/node_modules" />
</content>
warning: You should write your excludeFolder
lines
Is the solution not in any documentation in jetbrance, but employer from this company suggested this solution =)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With