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?
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.
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).
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
.
In mac
Code --> Preferences --> Settings --> Features --> Exclude --> Add Pattern / Remove
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With