Skip to content

Commit 243fb35

Browse files
Auto fold directories in the project panel by default (#15273)
1 parent e830865 commit 243fb35

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

assets/settings/default.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@
312312
"auto_reveal_entries": true,
313313
// Whether to fold directories automatically and show compact folders
314314
// (e.g. "a/b/c" ) when a directory has only one subdirectory inside.
315-
"auto_fold_dirs": false,
315+
"auto_fold_dirs": true,
316316
/// Scrollbar-related settings
317317
"scrollbar": {
318318
/// When to show the scrollbar in the project panel.

crates/project_panel/src/project_panel.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5085,6 +5085,9 @@ mod tests {
50855085
Project::init_settings(cx);
50865086

50875087
cx.update_global::<SettingsStore, _>(|store, cx| {
5088+
store.update_user_settings::<ProjectPanelSettings>(cx, |project_panel_settings| {
5089+
project_panel_settings.auto_fold_dirs = Some(false);
5090+
});
50885091
store.update_user_settings::<WorktreeSettings>(cx, |worktree_settings| {
50895092
worktree_settings.file_scan_exclusions = Some(Vec::new());
50905093
});
@@ -5102,6 +5105,15 @@ mod tests {
51025105
crate::init((), cx);
51035106
workspace::init(app_state.clone(), cx);
51045107
Project::init_settings(cx);
5108+
5109+
cx.update_global::<SettingsStore, _>(|store, cx| {
5110+
store.update_user_settings::<ProjectPanelSettings>(cx, |project_panel_settings| {
5111+
project_panel_settings.auto_fold_dirs = Some(false);
5112+
});
5113+
store.update_user_settings::<WorktreeSettings>(cx, |worktree_settings| {
5114+
worktree_settings.file_scan_exclusions = Some(Vec::new());
5115+
});
5116+
});
51055117
});
51065118
}
51075119

0 commit comments

Comments
 (0)