Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show hidden NodeModules folder in VSCode

Currently node modules folder in vscode is hidden, I would like to show this folder in VSCode.

Is there any specific setting in vscode to achieve this?

like image 797
Vivek Avatar asked Sep 20 '18 16:09

Vivek


People also ask

How do I show hidden folders in Visual Studio Code?

The settings for Visual Studio Code can be found: On a Windows or Linux computer, click menu File → Preferences → Settings. On a Mac, click menu Code → Preferences → Settings.


4 Answers

Explorer View

If node_modules is hidden in your explorer view, then you probably have a pattern that's matching that directory in your settings. Go to settings, search for files.exclude and ensure that you haven't excluded the directory in user settings and/or workspace settings.

Search Results

If you want search results to include node_modules by default, you'll need to remove the pattern from the search.exclude setting. Note that search.exclude inherits all glob patterns from the files.exclude setting.

If you simply want specific searches to include node_modules, but don't want it included by default, there's a gear icon that you can toggle in the search view (go to the search view, toggle the search details using the ... icon, click the gear icon in the "files to exclude" input field).

like image 116
jabacchetta Avatar answered Oct 19 '22 09:10

jabacchetta


To make the other answers more explicit, in order to unhide the node_modules contents for one project only, create a file named .vscode/settings.json in the project folder if it's not there yet and add these settings:

{
    "files.exclude": {
        "**/node_modules": false
    },
    "search.exclude": {
        "**/node_modules": false
    }
}

Note that the setting under "search.exclude" is required to re-include these files in the search, otherwise VSCode will inherit the "files.exclude" patterns defined in the user settings, which probably contain a line like "**/node_modules": true.

If you rather wish to unhide node_modules for all projects, open Preferences > Settings, be sure to select the User setting tab rather than the Workspace tab, then go to Text Editor > Files > Exclude and remove the line that contains node_modules.

like image 23
GOTO 0 Avatar answered Oct 19 '22 07:10

GOTO 0


In mac

Code --> Preferences --> Settings --> Features --> Exclude --> Add Pattern / Remove

like image 5
vivek Avatar answered Oct 19 '22 09:10

vivek


If you have .vscode folder in your directory then open settings.json file in this folder and replace "**/node_modules": true to "**/node_modules": false.

like image 1
Zeeshan Safdar Avatar answered Oct 19 '22 07:10

Zeeshan Safdar