Automate settings registration (#42238)
Release Notes: - N/A --------- Co-authored-by: Nia <nia@zed.dev>
This commit is contained in:
@@ -4,15 +4,9 @@
|
||||
//! disable Vim/Helix modes without having to depend on the `vim` crate in its
|
||||
//! entirety.
|
||||
|
||||
use gpui::App;
|
||||
use settings::{Settings, SettingsContent};
|
||||
|
||||
/// Initializes the `vim_mode_setting` crate.
|
||||
pub fn init(cx: &mut App) {
|
||||
VimModeSetting::register(cx);
|
||||
HelixModeSetting::register(cx);
|
||||
}
|
||||
use settings::{RegisterSetting, Settings, SettingsContent};
|
||||
|
||||
#[derive(RegisterSetting)]
|
||||
pub struct VimModeSetting(pub bool);
|
||||
|
||||
impl Settings for VimModeSetting {
|
||||
@@ -21,6 +15,7 @@ impl Settings for VimModeSetting {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(RegisterSetting)]
|
||||
pub struct HelixModeSetting(pub bool);
|
||||
|
||||
impl Settings for HelixModeSetting {
|
||||
|
||||
Reference in New Issue
Block a user