How to prevent indexing the vendor folder

Hi,

I'm working on a PrestaShop project and I want to prevent indexing the vendor folder

The first thing that I tried was to exclude the vendor folder

But it was still being indexed

I searched the settings related to PHP and Composer but with no luck

I also checked similar threads (about node_modules) but didn't get a hint on how to solve this

Please advise

Thank you

 

 

PhpStorm 2019.1.2
Build #PS-191.7141.52, built on May 8, 2019
Licensed to ----
Subscription is active until November 27, 2019
JRE: 1.8.0_202-release-1483-b49 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-50-generic

3 comments
Comment actions Permalink

Hi there,

Please check "PHP | Include Paths". Libraries added this way will still be indexed even if excluded via "Directories".

P.S. By default all stuff from composer will be added as Include Paths entries (External Libraries). This behaviour can be disabled so you can have full control.

P.P.S. Please note that if you completely exclude your vendor content then you will have NO code completion for classes & functions from those folders.

4
Comment actions Permalink

Thank you for the valuable information

Best regards

0
Comment actions Permalink

Woah! Andriy, thank you! This has been driving me bonkers for years! You have no idea how many times I have tried to exclude vendor and just really didn't understand why it was still indexed. Now this all makes sense and realize I don't want it excluded. 

UX: I think Intellij should not let a user mark a directory as excluded if it is an include path. The context menu should say something like "exclusion disabled because it is an include path" or something to indicate that the exclusion is non-active. 

Until then, so happy to have this sanity back! Thanks


https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003654040/comments/360000498699

0

Please sign in to leave a comment.