1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3use settings::{Settings, SettingsSources};
4
5#[derive(Clone, Serialize, Deserialize, PartialEq, JsonSchema)]
6#[serde(default)]
7/// Task-related settings.
8pub(crate) struct TaskSettings {
9 /// Whether to show task status indicator in the status bar. Default: true
10 pub(crate) show_status_indicator: bool,
11}
12
13impl Default for TaskSettings {
14 fn default() -> Self {
15 Self {
16 show_status_indicator: true,
17 }
18 }
19}
20
21impl Settings for TaskSettings {
22 const KEY: Option<&'static str> = Some("task");
23
24 type FileContent = Self;
25
26 fn load(
27 sources: SettingsSources<Self::FileContent>,
28 _: &mut gpui::AppContext,
29 ) -> gpui::Result<Self> {
30 sources.json_merge()
31 }
32}