Automate settings registration (#42238)
Release Notes: - N/A --------- Co-authored-by: Nia <nia@zed.dev>
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user