Search code examples
visual-studio-codenode-modules

Always search node_modules when looking for file in Visual Studio Code


On macOS, when searching for a project file in Visual Studio Code using Cmd + P, I want node_modules included among the searchable files every time I search.

How to permanently enable this?


Solution

  • On mac

    • Open settings
      • cmd + ,
      • or navigate via code → settings → settings
    • Type search.exclude
    • Delete **/node_modules from Search: Exclude

    enter image description here

    • Type .gitignore
    • Under features → search
    • Deselect "Controls whether to use .gitignore and .ignore files when searching

    enter image description here

    node_modules should be immediately searchable. If not, restart VSC.