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
+1 -4
View File
@@ -28,7 +28,7 @@ use rpc::{
proto::{self, REMOTE_SERVER_PEER_ID, REMOTE_SERVER_PROJECT_ID},
};
use settings::{Settings as _, initial_server_settings_content};
use settings::initial_server_settings_content;
use smol::stream::StreamExt;
use std::{
num::NonZeroU64,
@@ -74,9 +74,6 @@ pub struct HeadlessAppState {
impl HeadlessProject {
pub fn init(cx: &mut App) {
settings::init(cx);
language::init(cx);
project::Project::init_settings(cx);
extension_host::ExtensionSettings::register(cx);
log_store::init(true, cx);
}
@@ -1493,10 +1493,7 @@ async fn test_remote_git_diffs_when_recv_update_repository_delay(
.await
.unwrap();
let buffer_id = cx.update(|cx| buffer.read(cx).remote_id());
cx.update(|cx| {
workspace::init_settings(cx);
editor::init_settings(cx);
});
let cx = cx.add_empty_window();
let editor = cx.new_window_entity(|window, cx| {
Editor::for_buffer(buffer, Some(project.clone()), window, cx)
@@ -1853,8 +1850,6 @@ pub async fn init_test(
let proxy = Arc::new(ExtensionHostProxy::new());
server_cx.update(HeadlessProject::init);
let headless = server_cx.new(|cx| {
client::init_settings(cx);
HeadlessProject::new(
crate::HeadlessAppState {
session: ssh_server_client,
@@ -1906,7 +1901,6 @@ fn build_project(ssh: Entity<RemoteClient>, cx: &mut TestAppContext) -> Entity<P
cx.update(|cx| {
Project::init(&client, cx);
language::init(cx);
});
cx.update(|cx| Project::remote(ssh, client, node, user_store, languages, fs, cx))
-2
View File
@@ -397,8 +397,6 @@ pub fn execute_run(
log::info!("gpui app started, initializing server");
let session = start_server(listeners, log_rx, cx);
client::init_settings(cx);
GitHostingProviderRegistry::set_global(git_hosting_provider_registry, cx);
git_hosting_providers::init(cx);
dap_adapters::init(cx);