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
+2 -2
View File
@@ -2,9 +2,9 @@ use collections::HashMap;
use editor::EditorSettings;
use gpui::App;
use settings::Settings;
use settings::{RegisterSetting, Settings};
#[derive(Debug, Default)]
#[derive(Debug, Default, RegisterSetting)]
pub struct JupyterSettings {
pub kernel_selections: HashMap<String, String>,
}
-4
View File
@@ -15,7 +15,6 @@ use async_dispatcher::{Dispatcher, Runnable, set_dispatcher};
use gpui::{App, PlatformDispatcher};
use project::Fs;
pub use runtimelib::ExecutionState;
use settings::Settings as _;
pub use crate::jupyter_settings::JupyterSettings;
pub use crate::kernels::{Kernel, KernelSpecification, KernelStatus};
@@ -31,9 +30,6 @@ pub const KERNEL_DOCS_URL: &str = "https://zed.dev/docs/repl#changing-kernels";
pub fn init(fs: Arc<dyn Fs>, cx: &mut App) {
set_dispatcher(zed_dispatcher(cx));
JupyterSettings::register(cx);
::editor::init_settings(cx);
ReplSettings::register(cx);
repl_sessions_ui::init(cx);
ReplStore::init(fs, cx);
}
+2 -2
View File
@@ -1,7 +1,7 @@
use settings::Settings;
use settings::{RegisterSetting, Settings};
/// Settings for configuring REPL display and behavior.
#[derive(Clone, Debug)]
#[derive(Clone, Debug, RegisterSetting)]
pub struct ReplSettings {
/// Maximum number of lines to keep in REPL's scrollback buffer.
/// Clamped with [4, 256] range.