Start work on creating the inital structure for the settings UI
We created a proc macro that derives the settings ui trait on types and added that trait as a marker on Settings trait. Then we added the derive macro on all settings Co-authored-by: Ben Kunkle <ben@zed.dev>
This commit is contained in:
parent
5fd29d37a6
commit
3c0ec5f612
43 changed files with 170 additions and 82 deletions
|
@ -1,10 +1,10 @@
|
|||
use gpui::Pixels;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::{Settings, SettingsSources};
|
||||
use settings::{DeriveSettingsUI as SettingsUI, Settings, SettingsSources};
|
||||
use workspace::dock::DockPosition;
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[derive(Deserialize, Debug, SettingsUI)]
|
||||
pub struct CollaborationPanelSettings {
|
||||
pub button: bool,
|
||||
pub dock: DockPosition,
|
||||
|
@ -20,7 +20,7 @@ pub enum ChatPanelButton {
|
|||
WhenInCall,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[derive(Deserialize, Debug, SettingsUI)]
|
||||
pub struct ChatPanelSettings {
|
||||
pub button: ChatPanelButton,
|
||||
pub dock: DockPosition,
|
||||
|
@ -43,7 +43,7 @@ pub struct ChatPanelSettingsContent {
|
|||
pub default_width: Option<f32>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[derive(Deserialize, Debug, SettingsUI)]
|
||||
pub struct NotificationPanelSettings {
|
||||
pub button: bool,
|
||||
pub dock: DockPosition,
|
||||
|
@ -66,7 +66,7 @@ pub struct PanelSettingsContent {
|
|||
pub default_width: Option<f32>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug, SettingsUI)]
|
||||
pub struct MessageEditorSettings {
|
||||
/// Whether to automatically replace emoji shortcodes with emoji characters.
|
||||
/// For example: typing `:wave:` gets replaced with `👋`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue