Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Add init_settings to tests

Mikayla Makib19a712799a0
diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs
index 66f0fe77182..40ba0b7e67d 100644
--- a/crates/project_panel/src/project_panel.rs
+++ b/crates/project_panel/src/project_panel.rs
@@ -113,8 +113,12 @@ actions!(
]
);
-pub fn init(cx: &mut AppContext) {
+pub fn init_settings(cx: &mut AppContext) {
settings::register::<ProjectPanelSettings>(cx);
+}
+
+pub fn init(cx: &mut AppContext) {
+ init_settings(cx);
cx.add_action(ProjectPanel::expand_selected_entry);
cx.add_action(ProjectPanel::collapse_selected_entry);
cx.add_action(ProjectPanel::select_prev);
@@ -2051,6 +2055,7 @@ mod tests {
cx.foreground().forbid_parking();
cx.update(|cx| {
cx.set_global(SettingsStore::test(cx));
+ init_settings(cx);
theme::init((), cx);
language::init(cx);
editor::init_settings(cx);
diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs
index 376ecfc06bd..95d09e82ec4 100644
--- a/crates/zed/src/zed.rs
+++ b/crates/zed/src/zed.rs
@@ -2068,6 +2068,7 @@ mod tests {
workspace::init(app_state.clone(), cx);
language::init(cx);
editor::init(cx);
+ project_panel::init_settings(cx);
pane::init(cx);
app_state
})