1
0
Fork 0
forked from wry/wry

config: move input mode model into config module

This commit is contained in:
kossLAN 2026-05-29 17:11:14 -04:00
parent 36b5a831fc
commit c8a6b69bf1
No known key found for this signature in database
2 changed files with 7 additions and 8 deletions

View file

@ -7,7 +7,6 @@ mod parsers;
mod spanned;
mod value;
pub use crate::config::parsers::input_mode::InputMode;
use {
crate::{
config::{
@ -204,6 +203,12 @@ pub struct NamedAction {
pub action: Action,
}
#[derive(Clone, Debug)]
pub struct InputMode {
pub parent: Option<String>,
pub shortcuts: Vec<Shortcut>,
}
#[derive(Debug, Clone)]
pub struct Config {
pub keymap: Option<ConfigKeymap>,

View file

@ -1,7 +1,7 @@
use {
crate::{
config::{
Shortcut,
InputMode,
context::Context,
extractor::{Extractor, ExtractorError, opt, recover, str, val},
parser::{DataType, ParseResult, Parser, UnexpectedDataType},
@ -29,12 +29,6 @@ pub enum InputModeParserError {
ParseShortcuts(#[source] ShortcutsParserError),
}
#[derive(Clone, Debug)]
pub struct InputMode {
pub parent: Option<String>,
pub shortcuts: Vec<Shortcut>,
}
pub struct InputModesParser<'a>(pub &'a Context<'a>);
impl Parser for InputModesParser<'_> {