Open stkb opened 6 years ago
Does "./*.json"
work?
Unfortunately not, and btw I had it slightly wrong in my first post (now edited)
"*.json"
matches all .json file in all directories."/*.json"
matches only .json files 1+ levels down"./*.json"
doesn't seem to match any files.The patterns currently just match against the end of the full file path. The matcher is not aware of the workspace folder.
A workaround for you is to add the name of the root folder to the pattern, e.g. myroot/*.json
, but of course, that's not ideal.
We would need something like a `${workspaceFolder} variable to do this properly.
I'm getting a similar problem. The *
in folder/*.json
matches against sub-folders as well such as folder/child/file.json
instead of just the current directly. Would it be possible to split *
for just file pattern matching and **
for folder and file pattern matching similar to other implementations of file pattern matching such as glob?
I've tried asking this on stackoverflow and gitter without success. I have a project with (among other things) lots of .json files. This is the
.vscode/settings.json
file:The problem is that this matches all .json files in the project, but I need it to match only *.json files in the root directory. What can I put in
fileMatch
to enable this, or can this not be done with the file matching?