mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
modules/keymaps: keymaps
option should not accept str mappings
This commit is contained in:
parent
7f29aade86
commit
69b3a13532
1 changed files with 7 additions and 5 deletions
|
@ -84,10 +84,8 @@ in rec {
|
||||||
withKeyOpt ? true,
|
withKeyOpt ? true,
|
||||||
flatConfig ? false,
|
flatConfig ? false,
|
||||||
}:
|
}:
|
||||||
with types;
|
with types; let
|
||||||
either
|
mapOptionSubmodule = submodule {
|
||||||
str
|
|
||||||
(submodule {
|
|
||||||
options =
|
options =
|
||||||
(
|
(
|
||||||
if withKeyOpt
|
if withKeyOpt
|
||||||
|
@ -133,7 +131,11 @@ in rec {
|
||||||
options = mapConfigOptions;
|
options = mapConfigOptions;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
};
|
||||||
|
in
|
||||||
|
if flatConfig
|
||||||
|
then either str mapOptionSubmodule
|
||||||
|
else mapOptionSubmodule;
|
||||||
|
|
||||||
# Correctly merge two attrs (partially) representing a mapping.
|
# Correctly merge two attrs (partially) representing a mapping.
|
||||||
mergeKeymap = defaults: keymap: let
|
mergeKeymap = defaults: keymap: let
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue