mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-07 02:57:34 +00:00
30 lines
734 B
Rust
30 lines
734 B
Rust
|
use serde_derive::{Deserialize, Serialize};
|
||
|
use anyhow;
|
||
|
use settings::Setting;
|
||
|
use schemars::JsonSchema;
|
||
|
|
||
|
|
||
|
#[derive(Deserialize, Debug)]
|
||
|
pub struct ProjectPanelSettings {
|
||
|
pub git_status: bool,
|
||
|
}
|
||
|
|
||
|
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
|
||
|
pub struct ProjectPanelSettingsContent {
|
||
|
pub git_status: Option<bool>,
|
||
|
}
|
||
|
|
||
|
impl Setting for ProjectPanelSettings {
|
||
|
const KEY: Option<&'static str> = Some("project_panel");
|
||
|
|
||
|
type FileContent = ProjectPanelSettingsContent;
|
||
|
|
||
|
fn load(
|
||
|
default_value: &Self::FileContent,
|
||
|
user_values: &[&Self::FileContent],
|
||
|
_: &gpui::AppContext,
|
||
|
) -> anyhow::Result<Self> {
|
||
|
Self::load_via_json_merge(default_value, user_values)
|
||
|
}
|
||
|
}
|