How to stop RubyMine/WebStorm from including node_modules when using 'find in path'

六月ゝ 毕业季﹏ 提交于 2019-12-11 00:33:28

问题


I have a node.js project which, after running npm install has a node_modules folder in the project root. Everything works fine, but when I load the project into RubyMine, right-click on the project root folder and choose find in path..., the search includes all of the code inside node_modules, which is not useful.

I have tried to mark the node_modules folder as 'excluded', which works, but it still includes the contents in the search.

How can I get find in path... to only search my project files?


回答1:


  1. Create custom scope (can be accessed directly in Find in Path dialog (by clicking on ... button) or via Settings/Preferences | Appearance & Behavior | Scopes): include all and then exclude unwanted folders recursively (or just include desired folders only).

  2. Choose that scope in Find in Path dialog

    NOTE: Screenshot and settings path is from PhpStorm but it should be the same in RubyMine as well (it's platform-wide feature).

P.S. You can use the same approach in TODO window -- to only show TODOs from your own files.


Excluded folders should not be searched (works OK with ordinary excluded folders) -- possibly it's because they are also listed as JavaScript (or any other) libraries and at the same time located within the content root?



来源:https://stackoverflow.com/questions/34610247/how-to-stop-rubymine-webstorm-from-including-node-modules-when-using-find-in-pa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!