Skip to main content

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
6pub use auto_cmds::create_lua_autocmd;
7use nvim_oxi::Dictionary;
8
9mod auto_cmds;
10mod user_cmds;
11
12/// [`Dictionary`] of user command helpers.
13pub fn dict() -> Dictionary {
14    dict! {
15        "create": fn_from!(create),
16    }
17}
18
19/// Creates all configured autocommands and user commands.
20fn create(_: ()) {
21    auto_cmds::create();
22    user_cmds::create();
23}