Automate settings registration (#42238)
Release Notes: - N/A --------- Co-authored-by: Nia <nia@zed.dev>
This commit is contained in:
@@ -25,10 +25,6 @@ impl VimTestContext {
|
||||
git_ui::init(cx);
|
||||
crate::init(cx);
|
||||
search::init(cx);
|
||||
workspace::init_settings(cx);
|
||||
language::init(cx);
|
||||
editor::init_settings(cx);
|
||||
project::Project::init_settings(cx);
|
||||
theme::init(theme::LoadThemes::JustBase, cx);
|
||||
settings_ui::init(cx);
|
||||
});
|
||||
|
||||
@@ -40,6 +40,7 @@ use normal::search::SearchSubmit;
|
||||
use object::Object;
|
||||
use schemars::JsonSchema;
|
||||
use serde::Deserialize;
|
||||
use settings::RegisterSetting;
|
||||
pub use settings::{
|
||||
ModeContent, Settings, SettingsStore, UseSystemClipboard, update_settings_file,
|
||||
};
|
||||
@@ -268,8 +269,6 @@ actions!(
|
||||
|
||||
/// Initializes the `vim` crate.
|
||||
pub fn init(cx: &mut App) {
|
||||
vim_mode_setting::init(cx);
|
||||
VimSettings::register(cx);
|
||||
VimGlobals::register(cx);
|
||||
|
||||
cx.observe_new(Vim::register).detach();
|
||||
@@ -1943,6 +1942,7 @@ impl Vim {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(RegisterSetting)]
|
||||
struct VimSettings {
|
||||
pub default_mode: Mode,
|
||||
pub toggle_relative_line_numbers: bool,
|
||||
|
||||
Reference in New Issue
Block a user