Load all keybindings from JSON file

This commit is contained in:
Max Brunsfeld 2022-04-10 14:29:45 -07:00
parent b4babbeeaa
commit 9a4b8e3d8c
9 changed files with 81 additions and 53 deletions

View file

@ -1,6 +1,6 @@
use chrono::{Datelike, Local, Timelike};
use editor::{Autoscroll, Editor};
use gpui::{actions, keymap::Binding, MutableAppContext};
use gpui::{actions, MutableAppContext};
use std::{fs::OpenOptions, sync::Arc};
use util::TryFutureExt as _;
use workspace::AppState;
@ -8,7 +8,6 @@ use workspace::AppState;
actions!(journal, [NewJournalEntry]);
pub fn init(app_state: Arc<AppState>, cx: &mut MutableAppContext) {
cx.add_bindings(vec![Binding::new("ctrl-alt-cmd-j", NewJournalEntry, None)]);
cx.add_global_action(move |_: &NewJournalEntry, cx| new_journal_entry(app_state.clone(), cx));
}