
Closes #ISSUE Release Notes: - Improved checking of Zed settings so that unrecognized keys show warnings while editing them
38 lines
1.1 KiB
Rust
38 lines
1.1 KiB
Rust
use anyhow::Result;
|
|
use gpui::App;
|
|
use schemars::JsonSchema;
|
|
use serde_derive::{Deserialize, Serialize};
|
|
use settings::{Settings, SettingsSources};
|
|
|
|
#[derive(Deserialize, Debug)]
|
|
pub struct CallSettings {
|
|
pub mute_on_join: bool,
|
|
pub share_on_join: bool,
|
|
}
|
|
|
|
/// Configuration of voice calls in Zed.
|
|
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
|
|
#[schemars(deny_unknown_fields)]
|
|
pub struct CallSettingsContent {
|
|
/// Whether the microphone should be muted when joining a channel or a call.
|
|
///
|
|
/// Default: false
|
|
pub mute_on_join: Option<bool>,
|
|
|
|
/// Whether your current project should be shared when joining an empty channel.
|
|
///
|
|
/// Default: false
|
|
pub share_on_join: Option<bool>,
|
|
}
|
|
|
|
impl Settings for CallSettings {
|
|
const KEY: Option<&'static str> = Some("calls");
|
|
|
|
type FileContent = CallSettingsContent;
|
|
|
|
fn load(sources: SettingsSources<Self::FileContent>, _: &mut App) -> Result<Self> {
|
|
sources.json_merge()
|
|
}
|
|
|
|
fn import_from_vscode(_vscode: &settings::VsCodeSettings, _current: &mut Self::FileContent) {}
|
|
}
|