GUI way
- Go to "File -> Preferences -> Settings" (or press Ctrl+,) then:Image may be NSFW.
Clik here to view. - Type "exclude" to the search bar.
- Select the "Workspace" tab if you want this change to only effect your current project instead of each one.
- Click the "Add Pattern" button.
Code way
To open the
settings.json
file:- Press Ctrl+Shift+P or Cmd+Shift+P on Mac, then type "Open Workspace Settings (JSON)".
- OR, on older versions you can click the little
{}
icon at the top right corner of the GUI tab:Image may be NSFW.
Clik here to view.
Add excluded folders to
files.exclude
. Also check outsearch.exclude
andfiles.watcherExclude
as they might be useful too. This snippet contains their explanations and defaults:{ // Configure glob patterns for excluding files and folders. // For example, the files explorer decides which files and folders to show // or hide based on this setting. // Read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options)."files.exclude": {"**/.git": true,"**/.svn": true,"**/.hg": true,"**/CVS": true,"**/.DS_Store": true }, // Configure glob patterns for excluding files and folders in searches. // Inherits all glob patterns from the `files.exclude` setting. // Read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options)."search.exclude": {"**/node_modules": true,"**/bower_components": true }, // Configure glob patterns of file paths to exclude from file watching. // Patterns must match on absolute paths // (i.e. prefix with ** or the full path to match properly). // Changing this setting requires a restart. // When you experience Code consuming lots of cpu time on startup, // you can exclude large folders to reduce the initial load."files.watcherExclude": {"**/.git/objects/**": true,"**/.git/subtree-cache/**": true,"**/node_modules/*/**": true } }
For more details on the other settings, see the official settings.json
reference.