mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-09 20:16:11 +00:00
mkMappingOption wants to read a setting set in config without passing it every time, so it should be defined in config.
20 lines
361 B
Nix
20 lines
361 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.options) mkOption;
|
|
inherit (lib.types) nullOr str;
|
|
in {
|
|
config.vim.lib = {
|
|
mkMappingOption = description: default:
|
|
mkOption {
|
|
type = nullOr str;
|
|
default =
|
|
if config.vim.vendoredKeymaps
|
|
then default
|
|
else null;
|
|
inherit description;
|
|
};
|
|
};
|
|
}
|