Make rust-analyzer.files.excludeDirs work, actually

I have no idea what the original writer of the code thought but the logic just seems backwards. We should not exclude a file/directory if it is equal to an include! This also meant that we had to add a `root == path` check so this stuff will actually work, which in turn meant excludes (of root files) no longer worked...

Also rename if to `rust-analyzer.files.exclude`, because it can exclude files as well.
This commit is contained in:
Chayim Refael Friedman 2025-01-22 19:01:56 +02:00
parent 0fd4fc3522
commit ac6b054ca5
5 changed files with 46 additions and 11 deletions

View file

@ -1473,8 +1473,8 @@
{
"title": "files",
"properties": {
"rust-analyzer.files.excludeDirs": {
"markdownDescription": "These directories will be ignored by rust-analyzer. They are\nrelative to the workspace root, and globs are not supported. You may\nalso need to add the folders to Code's `files.watcherExclude`.",
"rust-analyzer.files.exclude": {
"markdownDescription": "These paths (file/directories) will be ignored by rust-analyzer. They are\nrelative to the workspace root, and globs are not supported. You may\nalso need to add the folders to Code's `files.watcherExclude`.",
"default": [],
"type": "array",
"items": {