-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project-specific settings for including / excluding directories and files #5443
Comments
Same problem in my Typescript projects. .gitignore'd directories still are included in cmd+p call. For projects with big |
Something else to consider: Maybe there is a global set of excluded patterns in the normal settings, things that are always in the same location and always excluded no matter the project, then additional per-project settings to customize the excluded items further. |
Going to prioritize this to start building in the coming weeks. |
I hope as part of this effort there will be also support for user-specific (aka SCM-ignored) VS team-shared (committed to SCM) settings files. Example:
|
It would be nice to be able to ignore files and directories in the Project Panel (file tree) similarly either on a global or per-project basis. |
For python projects, different project may use different formatter, or different code style, it would be nice to support configure these information each project, and if the setting is not found, fallback to user level setting |
++ since ex: https://github.com/kaleidawave/ezno/tree/main/parser/fuzz |
Exactly. Like many, I can't live without "Black on save" for my python projects. However, I can't allow that to happen when working a third-party project which doesn't use Black, as I occasionally do. Without per-project settings, this would be rather cumbersome to deal with. |
I'd like the ability to configure formatters at a project-level and default to the local installations of that formatter. Another feature from VSCode, which I found useful, was |
I think the title of this issue may be misleading, because project-specific settings file support has been just shipped in |
I adjusted the title to be more specific to what the body is asking. |
VSCode default patterns for excluded files / folders: **/.git |
* Part of https://github.com/zed-industries/community/issues/70 Allows to fully remove from Zed certain files or file groups: no items will be scanned or added into worktrees, so nothing will be shown in project tree, project search and go to file would not see those, corresponding FS events will be ignored. One exclusion is .git files: those are still not shown or accessible by default, yet tracked in the worktrees. By default, is configured to ```json "file_scan_exclusions": [ "**/.git", "**/.svn", "**/.hg", "**/CVS", "**/.DS_Store", "**/Thumbs.db", "**/.classpath", "**/.settings" ], ``` * In addition, contains code preparations for "search in included files" feature: new SearchOptions variant, search crate and RPC adjustments Release Notes: - Added `file_scan_exclusions` section to project settings to completely ignore certain files in Zed
Zed 0.114.1 got a settings knob to exclude certain files, defaults use the proposed above exclusions list: // Add files or globs of files that will be excluded by Zed entirely:
// they will be skipped during FS scan(s), file tree and file search
// will lack the corresponding file entries.
"file_scan_exclusions": [
"**/.git",
"**/.svn",
"**/.hg",
"**/CVS",
"**/.DS_Store",
"**/Thumbs.db",
"**/.classpath",
"**/.settings"
], Any file that matches the exclusions is now entirely excluded from Zed and should not be visible in project tree, file finder or anywhere else. Seems that the majority of the things mentioned here are implemented now, so I'll close this issue. |
is https://zed.dev/docs/getting-started documentation updated? I tried finding a combination of "file_scan_exclusions" and I wasn't able to |
I think there's none, so please submit a PR with tue adjustments 🙂 |
Thank you for adding this feature. It truly helps. But I discovered an issue which is kind of a deal breaker in cases when you have projects with different directory structure and naming convention. Defining the |
Great catch (albeit seems hard to implement?). |
@SomeoneToIgnore is it possible to reopen this particular issue? Since the name of this one states "Project-specific settings", but the feature was implemented as global. |
Indeed we can, but the main part of my message is to get an example of such project-specific files/directories that are ok to have in one project and not ok in another. As mentioned, it's somewhat tricky to implement potentially, and thinking of it more without your part of the context makes me wonder: why would anybody exclude |
@SomeoneToIgnore sure, the reason I discovered this issue is that I tried to search something in my codebase and I was getting unwanted results from my So the way to do the exclusion I discovered is described in this issue - define a So, possibly I misuse this setting and there is another way to exclude files and directories from search? If yes, then it's totally fine to have the |
Ah, I saw those. They are handy. But they don't remember your choices, so you need to fill them up every time you do the search. Which defies a purpose of fast search. |
Yes, persistence for them is lacking for now, alas, we should improve it. |
Sorry if this has been answered already, how can I surface .gitignore'd files in "Search project files..."? |
Thanks, I'm referring to "Search project files..." to find a file by filename rather than contents. |
Oh, I see now: there's no such thing yet and here's an issue for it: #4745 |
Depending the project, there is quite a bit of noise in some of my file searches. I would like to be able to exclude some directories (virtual environment directories, npm module directories, etc.) from being searched through when using
command+p
to find a file, to remove as much noise as possible. I'm guessing this implies some sort of project settings? I think it could just be as simple as a hidden json file, that gets committed with your project, that excludes items via patterns:A small example might be:
Some open-ended questions about this:
When a directory is added to an exclusion list in a project setting file, what all is affected?
Or are all of those separate project settings?
The text was updated successfully, but these errors were encountered: