The lack of a files.includes
property in VS Code was frustrating me so I have created a quick and dirty extension that can emulate the desired files.includes
behaviour until this feature is formally added to VS Code.
hide.config.js
filemodule.exports = {
ignore: ['.git'], // add any directories you are happy to exclude from the recursive search
keep: ['extension.js', 'commands/**'] // only these files will be available in the Explorer view
}
Hide Config
from the command palette to generate a .hidemyfilesrc
file.Hide Files
, .hidemyfilesrc
will replace the files.exclude
property in .vscode.settings.json
, thus excluding all of the files in your project except for the files and directories you add to the keep
array.hide.config.js
you will have to reload the window and run Hide Config
from the command palette for the changes to take effect (if someone has experience with VS Code extensions and can explain why this is necessary that would be great).hidemyfilesrc
file:{
"node_modules": true,
"dist": true
}
Hide Files
from the Command Palette to have the files disapear from the Explorer.