Add support of auto folded directories (#7674)

Added support of auto collapsed directories, for example when directory
has only one directory inside we should display it as dir1/dir2 (#6935
). Please feel free to propose better solutions, as I am new in Rust

Demo:
https://streamable.com/seo3n9

Release Notes:

- Added support for auto-collapsing directories.
This commit is contained in:
Yury Abykhodau 2024-02-26 20:01:59 +02:00 committed by GitHub
parent fcd0571ab4
commit 011ae8536c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 328 additions and 41 deletions

View file

@ -20,6 +20,7 @@ pub struct ProjectPanelSettings {
pub git_status: bool,
pub indent_size: f32,
pub auto_reveal_entries: bool,
pub auto_fold_dirs: bool,
}
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
@ -54,6 +55,11 @@ pub struct ProjectPanelSettingsContent {
///
/// Default: true
pub auto_reveal_entries: Option<bool>,
/// Whether to fold directories automatically
/// when directory has only one directory inside.
///
/// Default: true
pub auto_fold_dirs: Option<bool>,
}
impl Settings for ProjectPanelSettings {