Merge branch 'main' into file_finder
This commit is contained in:
commit
80b7f75d24
51 changed files with 1938 additions and 1355 deletions
|
@ -50,14 +50,16 @@ use util::{
|
|||
use uuid::Uuid;
|
||||
use workspace::{AppState, WorkspaceStore};
|
||||
use zed2::{
|
||||
build_window_options, ensure_only_instance, handle_cli_connection, initialize_workspace,
|
||||
languages, Assets, IsOnlyInstance, OpenListener, OpenRequest,
|
||||
build_window_options, ensure_only_instance, handle_cli_connection, init_zed_actions,
|
||||
initialize_workspace, languages, Assets, IsOnlyInstance, OpenListener, OpenRequest,
|
||||
};
|
||||
|
||||
mod open_listener;
|
||||
|
||||
fn main() {
|
||||
menu::init();
|
||||
zed_actions::init();
|
||||
|
||||
let http = http::client();
|
||||
init_paths();
|
||||
init_logger();
|
||||
|
@ -96,7 +98,7 @@ fn main() {
|
|||
let (listener, mut open_rx) = OpenListener::new();
|
||||
let listener = Arc::new(listener);
|
||||
let open_listener = listener.clone();
|
||||
app.on_open_urls(move |urls, _| open_listener.open_urls(urls));
|
||||
app.on_open_urls(move |urls, _| open_listener.open_urls(&urls));
|
||||
app.on_reopen(move |_cx| {
|
||||
// todo!("workspace")
|
||||
// if cx.has_global::<Weak<AppState>>() {
|
||||
|
@ -111,6 +113,8 @@ fn main() {
|
|||
|
||||
app.run(move |cx| {
|
||||
cx.set_global(*RELEASE_CHANNEL);
|
||||
cx.set_global(listener.clone());
|
||||
|
||||
load_embedded_fonts(cx);
|
||||
|
||||
let mut store = SettingsStore::default();
|
||||
|
@ -189,7 +193,7 @@ fn main() {
|
|||
file_finder::init(cx);
|
||||
// outline::init(cx);
|
||||
// project_symbols::init(cx);
|
||||
// project_panel::init(Assets, cx);
|
||||
project_panel::init(Assets, cx);
|
||||
// channel::init(&client, user_store.clone(), cx);
|
||||
// diagnostics::init(cx);
|
||||
// search::init(cx);
|
||||
|
@ -209,12 +213,13 @@ fn main() {
|
|||
// zed::init(&app_state, cx);
|
||||
|
||||
// cx.set_menus(menus::menus());
|
||||
init_zed_actions(app_state.clone(), cx);
|
||||
|
||||
if stdout_is_a_pty() {
|
||||
cx.activate(true);
|
||||
let urls = collect_url_args();
|
||||
if !urls.is_empty() {
|
||||
listener.open_urls(urls)
|
||||
listener.open_urls(&urls)
|
||||
}
|
||||
} else {
|
||||
upload_previous_panics(http.clone(), cx);
|
||||
|
@ -224,7 +229,7 @@ fn main() {
|
|||
if std::env::var(FORCE_CLI_MODE_ENV_VAR_NAME).ok().is_some()
|
||||
&& !listener.triggered.load(Ordering::Acquire)
|
||||
{
|
||||
listener.open_urls(collect_url_args())
|
||||
listener.open_urls(&collect_url_args())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue