1

When I try to click on some function in PhpStorm with a CRTL button the system tries to bring me to a definition of this function. Sometimes there are multiple definitions and the annoying page shows up telling to chose to which definition you want to go. Like here:

enter image description here

Because I am using grunt and minifing / concatenating results, the definitions is in multiple places. I know that I should ignore everything in node_modules, but the system does not. Is there a way for me to exclude some of the folders?

Community
  • 1
  • 1
Salvador Dali
  • 214,103
  • 147
  • 703
  • 753

1 Answers1

4

If you don't need any completion/navigation/etc. from your local node_modules, you can exclude this folder from your project:

right-click, Mark directory as/Excluded

You will still be able to run Grunt, but files in these folders won't be indexed and thus suggested for completion/navigation

Salvador Dali
  • 214,103
  • 147
  • 703
  • 753
lena
  • 90,154
  • 11
  • 145
  • 150
  • is there a way to do this without excluding the folder from your project? i am compiling all different javascript files to one `application.js` using grunt. now when i search for definition, i always have two hits, one from the original file, and the other from the compiled file. can i exclude the compiled file while keeping it in my project? – szaman Nov 03 '16 at 15:20
  • 1
    can you explain what you mean by excluding file while keeping it in project? When you mark folder as excluded, it's not indexed, but it is still available in your project - you can see files in project tool window, open them, etc. Do you REALLY need your generated files being indexed? Indexing auto-generated folders cause performance loss, duplicate items in search/navigation/completion, etc. – lena Nov 03 '16 at 15:31
  • thank your for your reply. i was under the impression that excluded files would also be excluded from version control, automatic upload to remote host etc. – szaman Nov 03 '16 at 20:39
  • excluded files are not excluded from versioning - though the new files added to excluded folders aren't suggested for adding to the repository, you can still add them, they will be shown in change lists, etc – lena Nov 04 '16 at 14:50