Disable intellij indexing on specific folder

前端 未结 4 565
轮回少年
轮回少年 2020-11-27 10:56

In my project I have .deploy folder which is created/updated when I deploy my app locally. Is it possible to disable indexing on that folder? Everything slows down whenever

相关标签:
4条回答
  • 2020-11-27 11:41

    On IntelliJ 13+ (don't know for earlier versions), you can right click on a folder > Mark Directory As > Excluded.

    0 讨论(0)
  • 2020-11-27 11:47

    After applying the Mark As > Excluded method to a folder you still might see unwanted results.

    You have to explicitly mark sub-folders as well to disable certain functionalities for sub-folders.

    indexing, find usages etc.

    0 讨论(0)
  • 2020-11-27 11:53

    Mark this folder as Excluded in the File | Project Structure | Modules | Sources tab.

    Edit: also make sure it's not added as a library in the project.

    0 讨论(0)
  • 2020-11-27 11:54

    if you cannot do it throu the Modules menu because your intellij freezes (like in my case) edit .iml file of your projet and add excludeFolder line as below:

    <content url="file://$MODULE_DIR$">
      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
      <sourceFolder url="file://$MODULE_DIR$/src/test/features" type="java-test-resource" />
      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
      <excludeFolder url="file://$MODULE_DIR$/node_modules" />
      <excludeFolder url="file://$MODULE_DIR$/target" />
    </content>
    
    0 讨论(0)
提交回复
热议问题