Auto fold directories in the project panel by default (#15273)
This commit is contained in:
parent
e830865eb1
commit
243fb3562c
2 changed files with 13 additions and 1 deletions
|
@ -312,7 +312,7 @@
|
||||||
"auto_reveal_entries": true,
|
"auto_reveal_entries": true,
|
||||||
// Whether to fold directories automatically and show compact folders
|
// Whether to fold directories automatically and show compact folders
|
||||||
// (e.g. "a/b/c" ) when a directory has only one subdirectory inside.
|
// (e.g. "a/b/c" ) when a directory has only one subdirectory inside.
|
||||||
"auto_fold_dirs": false,
|
"auto_fold_dirs": true,
|
||||||
/// Scrollbar-related settings
|
/// Scrollbar-related settings
|
||||||
"scrollbar": {
|
"scrollbar": {
|
||||||
/// When to show the scrollbar in the project panel.
|
/// When to show the scrollbar in the project panel.
|
||||||
|
|
|
@ -5085,6 +5085,9 @@ mod tests {
|
||||||
Project::init_settings(cx);
|
Project::init_settings(cx);
|
||||||
|
|
||||||
cx.update_global::<SettingsStore, _>(|store, cx| {
|
cx.update_global::<SettingsStore, _>(|store, cx| {
|
||||||
|
store.update_user_settings::<ProjectPanelSettings>(cx, |project_panel_settings| {
|
||||||
|
project_panel_settings.auto_fold_dirs = Some(false);
|
||||||
|
});
|
||||||
store.update_user_settings::<WorktreeSettings>(cx, |worktree_settings| {
|
store.update_user_settings::<WorktreeSettings>(cx, |worktree_settings| {
|
||||||
worktree_settings.file_scan_exclusions = Some(Vec::new());
|
worktree_settings.file_scan_exclusions = Some(Vec::new());
|
||||||
});
|
});
|
||||||
|
@ -5102,6 +5105,15 @@ mod tests {
|
||||||
crate::init((), cx);
|
crate::init((), cx);
|
||||||
workspace::init(app_state.clone(), cx);
|
workspace::init(app_state.clone(), cx);
|
||||||
Project::init_settings(cx);
|
Project::init_settings(cx);
|
||||||
|
|
||||||
|
cx.update_global::<SettingsStore, _>(|store, cx| {
|
||||||
|
store.update_user_settings::<ProjectPanelSettings>(cx, |project_panel_settings| {
|
||||||
|
project_panel_settings.auto_fold_dirs = Some(false);
|
||||||
|
});
|
||||||
|
store.update_user_settings::<WorktreeSettings>(cx, |worktree_settings| {
|
||||||
|
worktree_settings.file_scan_exclusions = Some(Vec::new());
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue