Add base keymap setting

Format all files

Co-Authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
Mikayla Maki 2023-03-07 12:19:51 -08:00
parent 3b31f10c6f
commit 19fc143209
12 changed files with 301 additions and 35 deletions

View file

@ -17,7 +17,7 @@ mod toolbar;
pub use smallvec;
use anyhow::{anyhow, Result, Context};
use anyhow::{anyhow, Context, Result};
use call::ActiveCall;
use client::{
proto::{self, PeerId},
@ -267,27 +267,30 @@ pub fn init(app_state: Arc<AppState>, cx: &mut MutableAppContext) {
})
},
);
cx.add_action(|_: &mut Workspace, _: &install_cli::Install, cx| {
cx.spawn(|workspace, mut cx| async move {
let err = install_cli::install_cli(&cx).await.context("Failed to create CLI symlink");
let err = install_cli::install_cli(&cx)
.await
.context("Failed to create CLI symlink");
cx.update(|cx| {
workspace.update(cx, |workspace, cx| {
if matches!(err, Err(_)) {
err.notify_err(workspace, cx);
} else {
workspace.show_notification(1, cx, |cx| {
cx.add_view(|_| MessageNotification::new_message("Successfully installed the 'zed' binary"))
cx.add_view(|_| {
MessageNotification::new_message(
"Successfully installed the `zed` binary",
)
})
});
}
})
})
}).detach();
})
.detach();
});
let client = &app_state.client;