nvrim/cmds.rs
1//! User / auto command creation orchestration.
2//!
3//! Provides a dictionary exposing `create` which defines all autocommands and user commands by
4//! delegating to internal modules (`auto_cmds`, `user_cmds`).
5
6use nvim_oxi::Dictionary;
7
8mod auto_cmds;
9mod user_cmds;
10
11pub use auto_cmds::create_autocmd;
12
13/// [`Dictionary`] of user command helpers.
14pub fn dict() -> Dictionary {
15 dict! {
16 "create": fn_from!(create),
17 }
18}
19
20/// Creates all configured autocommands and user commands.
21fn create(_: ()) {
22 auto_cmds::create();
23 user_cmds::create();
24}