Stop PHPStorm code completion from code within compiled javascript directories
Answered
In Laravel projects, we use gulp or webpack to combine/transpile javascript files to the public folder. PHPStorm indexes these directories and causes method/class suggestions to duplicate.
Is there an easy way to exclude such files/directories from being included for code hinting?
I would like a "Mark directory/file as excluded code suggestion" feature.
Please sign in to leave a comment.
The "mark directory as Excluded" is already in IDE. You can right click a folder in a Project Tool window > Mark directory as...
Yes, I know that. Before posting, I was googling for solutions. Common answers that came up mentioned "Mark directory as excluded" and that it completely hides it from project tree. I don't want that.
I want everything to function normally except that it's not used in code completion. Maybe stop indexing it altogether.
>Common answers that came up mentioned "Mark directory as excluded" and that it completely hides it from project tree. I don't want that.
It does not hide such folder from the tree.
Unless, of course, if you disable "Show Excluded Files" option in the Project View panel.
>I want everything to function normally except that it's not used in code completion. Maybe stop indexing it altogether.
Excluded folder behaves just like that -- it is ignore by indexing routines (IDE still checks for files in such folders but does not index them)
https://www.jetbrains.com/help/phpstorm/2017.1/directories.html?search=directories
You are right.
Hmm maybe I interpreted your comment here wrongly:
> Such folders now will still be displayed in Project view
https://intellij-support.jetbrains.com/hc/en-us/community/posts/207069905/comments/207466459
That is a nearly 6.5 years old thread ... Yeah -- back then it worked like that.
But now it's not -- check this ticket: https://youtrack.jetbrains.com/issue/IDEA-129233 , these comments in particular: