1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4#[derive(Deserialize, Debug)]
5pub struct ProjectDiagnosticsSettings {
6 pub include_warnings: bool,
7}
8
9#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
10pub struct ProjectDiagnosticsSettingsContent {
11 include_warnings: Option<bool>,
12}
13
14impl settings::Setting for ProjectDiagnosticsSettings {
15 const KEY: Option<&'static str> = Some("diagnostics");
16 type FileContent = ProjectDiagnosticsSettingsContent;
17
18 fn load(
19 default_value: &Self::FileContent,
20 user_values: &[&Self::FileContent],
21 _cx: &gpui::AppContext,
22 ) -> anyhow::Result<Self>
23 where
24 Self: Sized,
25 {
26 Self::load_via_json_merge(default_value, user_values)
27 }
28}