VS Code allows you to hide directories and files from both the Explorer view and Search view.
You can set this to happen at the global level but I was working on a project recently where I wanted to see certain generated files I usually ignore.
In your workspace's settings.json, you can write:
{
    "files.exclude": {
        "**/*.o": false /* boolean to determine visibility */
    }
}This will override your global settings.