Use the word 'keymap' more consistently

Co-authored-by: Keith Simmons <keith@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-04-11 17:02:16 -07:00
parent be11f63f1e
commit ee3eb9658f
6 changed files with 15 additions and 17 deletions

View file

@ -7,14 +7,14 @@ use serde_json::value::RawValue;
#[derive(Deserialize, Default, Clone)]
#[serde(transparent)]
pub struct KeyMapFile(BTreeMap<String, ActionsByKeystroke>);
pub struct KeymapFile(BTreeMap<String, ActionsByKeystroke>);
type ActionsByKeystroke = BTreeMap<String, Box<RawValue>>;
#[derive(Deserialize)]
struct ActionWithData<'a>(#[serde(borrow)] &'a str, #[serde(borrow)] &'a RawValue);
impl KeyMapFile {
impl KeymapFile {
pub fn load_defaults(cx: &mut MutableAppContext) {
for path in ["keymaps/default.json", "keymaps/vim.json"] {
Self::load(path, cx).unwrap();