Replace build_workspace fn with an initialize function that takes a workspace

This makes it clearer that the function is not providing necessary
dependencies to a workspace, but rather configuring it with all of
the panels and widgets which are defined in downstream crates.
This commit is contained in:
Max Brunsfeld 2022-05-19 14:56:40 -07:00
parent 9e47e19f4e
commit c4554c1720
6 changed files with 125 additions and 115 deletions

View file

@ -40,9 +40,9 @@ use theme::{ThemeRegistry, DEFAULT_THEME_NAME};
use util::{ResultExt, TryFutureExt};
use workspace::{self, AppState, OpenNew, OpenPaths};
use zed::{
self, build_window_options, build_workspace,
self, build_window_options,
fs::RealFs,
languages, menus,
initialize_workspace, languages, menus,
settings_file::{settings_from_files, watch_keymap_file, WatchedJsonFile},
};
@ -193,7 +193,7 @@ fn main() {
user_store,
fs,
build_window_options,
build_workspace,
initialize_workspace,
});
workspace::init(app_state.clone(), cx);
journal::init(app_state.clone(), cx);