mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-26 18:58:43 +02:00
Allow importing `mkExtension` without needing to supply any dependencies. All dependencies can be accessed via module args anyway.
25 lines
556 B
Nix
25 lines
556 B
Nix
lib: rec {
|
|
# FIXME: don't manually put Default in the description
|
|
# TODO: Comply with #603
|
|
mkModeMappingsOption =
|
|
mode: defaults:
|
|
lib.mkOption {
|
|
type = with lib.types; attrsOf strLuaFn;
|
|
default = { };
|
|
description = ''
|
|
Keymaps in ${mode} mode.
|
|
|
|
Default:
|
|
```nix
|
|
${defaults}
|
|
```
|
|
'';
|
|
};
|
|
|
|
mkMappingsOption =
|
|
{ insertDefaults, normalDefaults }:
|
|
{
|
|
i = mkModeMappingsOption "insert" insertDefaults;
|
|
n = mkModeMappingsOption "normal" normalDefaults;
|
|
};
|
|
}
|