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
|
@ -6,7 +6,7 @@
|
|||
|
||||
use anyhow::Result;
|
||||
use gpui::App;
|
||||
use settings::{Settings, SettingsSources};
|
||||
use settings::{DeriveSettingsUI as SettingsUI, Settings, SettingsSources};
|
||||
|
||||
/// Initializes the `vim_mode_setting` crate.
|
||||
pub fn init(cx: &mut App) {
|
||||
|
@ -17,6 +17,7 @@ pub fn init(cx: &mut App) {
|
|||
/// Whether or not to enable Vim mode.
|
||||
///
|
||||
/// Default: false
|
||||
#[derive(SettingsUI)]
|
||||
pub struct VimModeSetting(pub bool);
|
||||
|
||||
impl Settings for VimModeSetting {
|
||||
|
@ -43,6 +44,7 @@ impl Settings for VimModeSetting {
|
|||
/// Whether or not to enable Helix mode.
|
||||
///
|
||||
/// Default: false
|
||||
#[derive(SettingsUI)]
|
||||
pub struct HelixModeSetting(pub bool);
|
||||
|
||||
impl Settings for HelixModeSetting {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue