Skip to content

Instantly share code, notes, and snippets.

@a1300
Last active December 2, 2018 18:18
Show Gist options
  • Save a1300/d14e417d3e37b33570ce307eea38a51d to your computer and use it in GitHub Desktop.
Save a1300/d14e417d3e37b33570ce307eea38a51d to your computer and use it in GitHub Desktop.

VS Code Search workaround for "search.exclude"

The following workaround worked for me ✔️

I wanted to exclude /node_modules but include /node_modules/asch-core for search.

In the .vscode/settings.json file I configured:

{
  "search.exclude": {
    "**/node_modules/": true,
  },
  "search.useIgnoreFiles": false,
  "search.useGlobalIgnoreFiles": false
}

search.useIgnoreFiles: false → search uses .gitignore files: no search.useGlobalIgnoreFiles: false → search uses global .gitignore files: no

On the left panel I untoggled the "Use Exclude Settings and Ignore Files" _ Then I added the directory I wanted to include (in my case: /node_modules/asch-core, ./*) into the files to include TextBox.

{
"search.exclude": {
"**/node_modules/": true,
},
"search.useIgnoreFiles": false,
"search.useGlobalIgnoreFiles": false
}
@a1300
Copy link
Author

a1300 commented Dec 1, 2018

search_exclude_hack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment