mirror of https://github.com/helix-editor/helix
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
704 B
Rust
21 lines
704 B
Rust
use helix_event::{events, register_event};
|
|
use helix_view::document::Mode;
|
|
use helix_view::events::{DocumentDidChange, SelectionDidChange};
|
|
|
|
use crate::commands;
|
|
use crate::keymap::MappableCommand;
|
|
|
|
events! {
|
|
OnModeSwitch<'a, 'cx> { old_mode: Mode, new_mode: Mode, cx: &'a mut commands::Context<'cx> }
|
|
PostInsertChar<'a, 'cx> { c: char, cx: &'a mut commands::Context<'cx> }
|
|
PostCommand<'a, 'cx> { command: & 'a MappableCommand, cx: &'a mut commands::Context<'cx> }
|
|
}
|
|
|
|
pub fn register() {
|
|
register_event::<OnModeSwitch>();
|
|
register_event::<PostInsertChar>();
|
|
register_event::<PostCommand>();
|
|
register_event::<DocumentDidChange>();
|
|
register_event::<SelectionDidChange>();
|
|
}
|