Automate settings registration (#42238)

Release Notes:

- N/A

---------

Co-authored-by: Nia <nia@zed.dev>
This commit is contained in:
Mikayla Maki
2025-11-07 22:27:14 +00:00
committed by GitHub
co-authored by Nia
parent 309947aa53
commit 5f8226457e
161 changed files with 196 additions and 599 deletions
-4
View File
@@ -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);
});
+2 -2
View File
@@ -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,