refactor(core): Use the new `keymaps` crate
This commit is contained in:
parent
5f69311dfa
commit
2eb6b12bd7
|
@ -19,6 +19,7 @@ tokio = { version = "1.33", features = ["macros", "rt-multi-thread"] }
|
|||
|
||||
# lua stuff
|
||||
language_macros = { path = "./language_macros" }
|
||||
keymaps = { path = "./keymaps", features = ["crossterm"] }
|
||||
mlua = { version = "0.9.1", features = ["lua54", "async", "send", "serialize"] }
|
||||
once_cell = "1.18.0"
|
||||
|
||||
|
|
|
@ -3,6 +3,10 @@ use std::{collections::HashMap, str::FromStr};
|
|||
use anyhow::{Error, Result};
|
||||
use cli_log::{info, trace, warn};
|
||||
use crossterm::event::Event;
|
||||
use keymaps::{
|
||||
key_repr::{Key, Keys},
|
||||
trie::Node,
|
||||
};
|
||||
use tokio::sync::oneshot;
|
||||
|
||||
use crate::{
|
||||
|
@ -12,10 +16,6 @@ use crate::{
|
|||
Api, Command, Debug, Keymaps, Raw, Trinitrix, Ui,
|
||||
},
|
||||
events::EventStatus,
|
||||
keymappings::{
|
||||
key::{Key, Keys},
|
||||
trie::Node,
|
||||
},
|
||||
status::State,
|
||||
App,
|
||||
},
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use anyhow::Result;
|
||||
use cli_log::info;
|
||||
use crossterm::event::Event as CrosstermEvent;
|
||||
use keymaps::key_repr::{Key, Keys};
|
||||
|
||||
use crate::app::{
|
||||
command_interface::{Api::Raw, Command, Raw::SendInputUnprocessed, Trinitrix::Api},
|
||||
events::{Event, EventStatus},
|
||||
keymappings::key::{Key, Keys},
|
||||
status::State,
|
||||
App,
|
||||
};
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
pub mod command_interface;
|
||||
pub mod config;
|
||||
pub mod events;
|
||||
pub mod keymappings;
|
||||
pub mod status;
|
||||
|
||||
use std::{
|
||||
|
@ -12,16 +11,15 @@ use std::{
|
|||
use anyhow::{Context, Error, Result};
|
||||
use cli_log::{info, warn};
|
||||
use directories::ProjectDirs;
|
||||
use keymaps::trie::Node;
|
||||
use matrix_sdk::Client;
|
||||
use tokio::sync::mpsc;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
|
||||
use self::{
|
||||
command_interface::{
|
||||
command_transfer_value::support_types::Function, lua_command_manager::LuaCommandManager,
|
||||
},
|
||||
keymappings::trie::Node,
|
||||
use self::command_interface::{
|
||||
command_transfer_value::support_types::Function, lua_command_manager::LuaCommandManager,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
accounts::{Account, AccountsManager},
|
||||
app::{
|
||||
|
|
|
@ -3,6 +3,7 @@ use core::fmt;
|
|||
use anyhow::{bail, Error, Result};
|
||||
use cli_log::warn;
|
||||
use indexmap::IndexMap;
|
||||
use keymaps::key_repr::Keys;
|
||||
use matrix_sdk::{
|
||||
room::MessagesOptions,
|
||||
ruma::{
|
||||
|
@ -12,8 +13,6 @@ use matrix_sdk::{
|
|||
Client,
|
||||
};
|
||||
|
||||
use super::keymappings::key::Keys;
|
||||
|
||||
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Debug)]
|
||||
pub enum State {
|
||||
Normal,
|
||||
|
|
Reference in New Issue