After the seminar on using VS Code with Github and CoPilot, I decided to give it a try for editing. I have used UE Studio for many years, and find it does what I want except for AI integration. So I decided to work with VS Code, knowing others are using it also.
Here is my main question. Right now I have all of the source code in a single folder. This includes .prg files, .bmp, .ico, .c, and .obj plus my .mak and of course my .exe that is created.
When I set up Explorer, all of the files show up. I only want it to show the .prg files.
I tried putting the other files in other directories but then when performing the build, it reports it can't find the .ico files. That is annoying because they are there and the path is valid.
I have not been able to set a filter to just show files I want ( like just the .prg files ).
As anyone had success setting this up ?
Search
VS Code Settings File Filtering Shows Only. prg Files 26 results
Yes—VS Code can hide every file except the ones you really care about.
The trick is to tell the Explorer what to exclude, rather than what to show, and you do that in the workspace-scoped
The trick is to tell the Explorer what to exclude, rather than what to show, and you do that in the workspace-scoped
settings.json.Step-by-step
- Open the folder that contains your project in VS Code.
- Press
Ctrl + Shift + P(orCmd + Shift + Pon macOS) and run
Preferences: Open Workspace Settings (JSON).
This creates / opens.vscode/settings.jsonin your project root. - Add the following entry:jsoncCopy
"files.exclude": { "**/*": true, // hide everything … "**/*.prg": false // … except .prg files }You can list as many exceptions as you need (for example, also allow the.makfile):jsoncCopy"files.exclude": { "**/*": true, "**/*.prg": false, "**/*.mak": false } - Save the file.
The Explorer immediately refreshes and only the .prg (and any other whitelisted) files remain visible .
🔎 The filter does not move or delete anything on disk, so your build scripts will still find the.ico,.obj, etc