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.  Release Notes: - Improved file finder to include indexed gitignored files in its search results
This commit is contained in:
parent
5b6b911946
commit
94c006236e
6 changed files with 229 additions and 33 deletions
|
@ -8,6 +8,7 @@ pub struct FileFinderSettings {
|
|||
pub file_icons: bool,
|
||||
pub modal_max_width: Option<FileFinderWidth>,
|
||||
pub skip_focus_for_active_in_search: bool,
|
||||
pub include_ignored: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
|
||||
|
@ -24,6 +25,20 @@ pub struct FileFinderSettingsContent {
|
|||
///
|
||||
/// Default: true
|
||||
pub skip_focus_for_active_in_search: Option<bool>,
|
||||
/// Determines whether to show the git status in the file finder
|
||||
///
|
||||
/// Default: true
|
||||
pub git_status: Option<bool>,
|
||||
/// 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:
|
||||
/// * `Some(true)`: Use all gitignored files
|
||||
/// * `Some(false)`: Use only the files Zed had indexed
|
||||
/// * `None`: Be smart and search for ignored when called from a gitignored worktree
|
||||
///
|
||||
/// Default: None
|
||||
pub include_ignored: Option<Option<bool>>,
|
||||
}
|
||||
|
||||
impl Settings for FileFinderSettings {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue