Add collapse functionality to outline entries (#33490)
partly Closes #23075 Release Notes: - Now provides collapse and enables functionality to outline entries - Add a new expand_outlines_with_depth setting to customize how deep the tree is expanded by when a file is opened part 2 is in #34164 **Visual examples**   
This commit is contained in:
parent
9863c8a44e
commit
be0d9eecb7
3 changed files with 826 additions and 49 deletions
File diff suppressed because it is too large
Load diff
|
@ -31,6 +31,7 @@ pub struct OutlinePanelSettings {
|
|||
pub auto_reveal_entries: bool,
|
||||
pub auto_fold_dirs: bool,
|
||||
pub scrollbar: ScrollbarSettings,
|
||||
pub expand_outlines_with_depth: usize,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
|
@ -105,6 +106,13 @@ pub struct OutlinePanelSettingsContent {
|
|||
pub indent_guides: Option<IndentGuidesSettingsContent>,
|
||||
/// Scrollbar-related settings
|
||||
pub scrollbar: Option<ScrollbarSettingsContent>,
|
||||
/// Default depth to expand outline items in the current file.
|
||||
/// The default depth to which outline entries are expanded on reveal.
|
||||
/// - Set to 0 to collapse all items that have children
|
||||
/// - Set to 1 or higher to collapse items at that depth or deeper
|
||||
///
|
||||
/// Default: 100
|
||||
pub expand_outlines_with_depth: Option<usize>,
|
||||
}
|
||||
|
||||
impl Settings for OutlinePanelSettings {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue