`file_scan_exclusions` glob syntax to select root folder (or file) but not subfolders (or files deeper in the tree) with the same name
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
The following config results in excluding all folders named "foldername" in the codebase tree, effectively equivalent to "**/foldername" (I only want to exclude the matching folder at the root of the tree):
"file_scan_exclusions": [
"foldername"
]
I tried "./foldername" and "foldername" and "~/foldername", but these do not match anything at all.
Through trial and error using variants of the Glob syntax documented elsewhere, I found this workaround: "[f]oldername" ... which feels a bit "dirty" to me :)
If I understand correctly, this behaviour matches the heuristics implemented in PathMatcher, more specifically the cascade into self.glob:
https://github.com/zed-industries/zed/blob/a0582d02b9f393ba94551d61ce6e5ffacf77760a/crates/util/src/paths.rs#L217C6-L242
Is there a "cleaner" way to reference root folders / files?
Environment
Zed: v0.119.21 (Zed) OS: macOS 14.3.0 Memory: 8 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.
If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.
No response
Related issue: https://github.com/zed-industries/zed/issues/7195 (folder-specific / project-specific config)
maybe you could try like this "foldername/**"