Merge pull request #1450 from alfarelcynthesis/no-default-mappings-option

treewide: allow disabling nvf mappings
This commit is contained in:
Alfarel 2026-04-10 13:04:12 -04:00 committed by GitHub
commit 3ab2d5d876
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
52 changed files with 489 additions and 622 deletions

View file

@ -0,0 +1,20 @@
{
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.enable
then default
else null;
inherit description;
};
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./config.nix
./options.nix
];
}

View file

@ -0,0 +1,11 @@
{lib, ...}: let
inherit (lib.options) mkOption;
inherit (lib.types) attrsOf raw;
in {
options.vim.lib = mkOption {
# The second type should be one without merge semantics and which allows function values.
type = attrsOf raw;
default = {};
internal = true;
};
}