Properly handle ignored files in the file finder (#31542)

Follow-up of https://github.com/zed-industries/zed/pull/31457

Add a button and also allows to use `search::ToggleIncludeIgnored`
action in the file finder to toggle whether to show gitignored files or
not.
By default, returns back to the gitignored treatment before the PR
above.


![image](https://github.com/user-attachments/assets/c3117488-9c51-4b34-b630-42098fe14b4d)


Release Notes:

- Improved file finder to include indexed gitignored files in its search
results
This commit is contained in:
Kirill Bulatov 2025-05-27 21:34:28 +03:00 committed by GitHub
parent 5b6b911946
commit 94c006236e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 229 additions and 33 deletions

View file

@ -959,7 +959,17 @@
// "skip_focus_for_active_in_search": false
//
// Default: true
"skip_focus_for_active_in_search": true
"skip_focus_for_active_in_search": true,
// Whether to show the git status in the file finder.
"git_status": true,
// Whether to use gitignored files when searching.
// Only the file Zed had indexed will be used, not necessary all the gitignored files.
//
// Can accept 3 values:
// * `true`: Use all gitignored files
// * `false`: Use only the files Zed had indexed
// * `null`: Be smart and search for ignored when called from a gitignored worktree
"include_ignored": null
},
// Whether or not to remove any trailing whitespace from lines of a buffer
// before saving it.