marleyvim/lib/keys/default.nix

27 lines
690 B
Nix
Raw Normal View History

_: {
keys = rec {
## [String] | String -> String -> String -> String -> AttrSet
2024-11-25 19:05:18 -08:00
mk = mode: key: action: desc: {
inherit mode key action;
options = {
inherit desc;
};
};
## [String] | String -> String -> String -> AttrSet
2024-11-25 19:05:18 -08:00
mk' = mode: key: action:
mk mode key action null;
## [String] | String -> String -> String -> String -> AttrSet -> AttrSet
2024-11-25 19:05:18 -08:00
mkWithOpts = mode: key: action: desc: opts:
(mk mode key action desc)
// {
options = opts;
};
## [String] | String -> String -> String -> AttrSet -> AttrSet
2024-11-25 19:05:18 -08:00
mkWithOpts' = mode: key: action: opts:
mkWithOpts mode key action null opts;
};
}