1use anyhow::Result;
2use schemars::JsonSchema;
3use serde_derive::{Deserialize, Serialize};
4use settings::{Settings, SettingsSources};
5
6#[derive(Deserialize, Debug, Clone, Copy, PartialEq)]
7pub struct FileFinderSettings {
8 pub file_icons: bool,
9}
10
11#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
12pub struct FileFinderSettingsContent {
13 /// Whether to show file icons in the file finder.
14 ///
15 /// Default: true
16 pub file_icons: Option<bool>,
17}
18
19impl Settings for FileFinderSettings {
20 const KEY: Option<&'static str> = Some("file_finder");
21
22 type FileContent = FileFinderSettingsContent;
23
24 fn load(sources: SettingsSources<Self::FileContent>, _: &mut gpui::AppContext) -> Result<Self> {
25 sources.json_merge()
26 }
27}