Atom exclude node_modules folder from search

Ville Miekk-oja picture Ville Miekk-oja · Jun 29, 2016 · Viewed 16.8k times · Source

How to exclude node_modules folder from Atom searches "Find in project" after you have put node_modules inside your .gitignore file? Does atom require that the project actually has a git repository, or should the .gitignore be enough for Atom to exclude the folder?

My .gitignore looks like this:

.DS_STORE
*.log

node_modules

dist
coverage

Answer

aSmater.Me picture aSmater.Me · Jul 12, 2017

Steps

  1. Launch atom
  2. From the menu: edit > preferences (atom > prefernces on Mac)
  3. From the side menu, click the button "Open Config Folder"

Now a new atom IDE should open.

  1. Open the file "config.cson"
  2. Add ignoredNames: ["node_modules"] under core

Example of a config.cson

"*":
  core:
    ignoredNames: [
      ".git"
      "node_modules"
    ]
  editor: {}
  minimap:
    plugins:
      "highlight-selected": true
      "highlight-selectedDecorationsZIndex": 0
  welcome:
    showOnStartup: false

Hope this helps