In 2025 to exclude things in your workspace, edit your workspacename.code-workspace
file like this:
{
"folders": [
{
"path": "."
},
],
"settings": {
"files.exclude": {
"./path/to/exclude": true,
}
}
}