Merge pull request #2233 from zed-industries/fix-code-folding-initialization

Initialize code fold indicators on buffer startup
This commit is contained in:
Mikayla Maki 2023-03-03 12:30:53 -08:00 committed by GitHub
commit 50682dc685
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 152 additions and 206 deletions

View file

@ -633,16 +633,22 @@ pub struct FieldEditor {
pub selection: SelectionStyle,
}
#[derive(Clone, Deserialize, Default)]
pub struct InteractiveColor {
pub color: Color,
}
#[derive(Clone, Deserialize, Default)]
pub struct CodeActions {
#[serde(default)]
pub indicator: Interactive<Indicator>,
pub indicator: Interactive<InteractiveColor>,
pub vertical_scale: f32,
}
#[derive(Clone, Deserialize, Default)]
pub struct Folds {
pub indicator: Interactive<Indicator>,
pub indicator: Interactive<InteractiveColor>,
pub ellipses: FoldEllipses,
pub fold_background: Color,
pub icon_width: f32,
pub folded_icon: String,
@ -650,8 +656,10 @@ pub struct Folds {
}
#[derive(Clone, Deserialize, Default)]
pub struct Indicator {
pub color: Color,
pub struct FoldEllipses {
pub text_color: Color,
pub background: Interactive<InteractiveColor>,
pub corner_radius_factor: f32,
}
#[derive(Clone, Deserialize, Default)]