I can't find node_modules folder from scopes settings

I want to exclude node_modules folder from global search, so I was trying to create a customized scope, but I don't see node_modules. Also I realized that node_modules is marked as library root. I'm not sure if there is any relationship.

My question would be how can setup the scope to exclude the search under folder node_module?

0

node_modules are only partially excluded - direct dependencies listed in package.json are added to JavaScript libraries and thus included.

Project scope doesn't include libraries, so you won't see files from node_modules in search result when using it.

JavaScript libraries are only included when using Directory scope with corresponding folder selected, or when using custom scope with explicit filters. Excluding libraries from custom scope is a bit tricky... To make it work, you need to prefix your scope pattern with file[your_project_name]:*/&& to overwrite the default scope - see https://youtrack.jetbrains.com/issue/IDEA-145142#comment=27-1156171 for explanation

Related feature request: : https://youtrack.jetbrains.com/issue/IDEA-103560

1

You probably want to right click the project window tool and show excluded files :) 

0

请先登录再写评论。