mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
modules/keymaps: remove possibility to add a keymap without an action
This commit is contained in:
parent
0de47ebf77
commit
7f29aade86
2 changed files with 5 additions and 13 deletions
|
@ -83,7 +83,6 @@ in rec {
|
||||||
defaultMode ? "",
|
defaultMode ? "",
|
||||||
withKeyOpt ? true,
|
withKeyOpt ? true,
|
||||||
flatConfig ? false,
|
flatConfig ? false,
|
||||||
actionIsOptional ? false,
|
|
||||||
}:
|
}:
|
||||||
with types;
|
with types;
|
||||||
either
|
either
|
||||||
|
@ -113,14 +112,10 @@ in rec {
|
||||||
example = ["n" "v"];
|
example = ["n" "v"];
|
||||||
};
|
};
|
||||||
|
|
||||||
action =
|
action = mkOption {
|
||||||
if actionIsOptional
|
type = str;
|
||||||
then helpers.mkNullOrOption str "The action to execute"
|
description = "The action to execute.";
|
||||||
else
|
};
|
||||||
mkOption {
|
|
||||||
type = str;
|
|
||||||
description = "The action to execute.";
|
|
||||||
};
|
|
||||||
|
|
||||||
lua = mkOption {
|
lua = mkOption {
|
||||||
type = bool;
|
type = bool;
|
||||||
|
|
|
@ -26,7 +26,6 @@ in {
|
||||||
defaultMode = modeProps.short;
|
defaultMode = modeProps.short;
|
||||||
withKeyOpt = false;
|
withKeyOpt = false;
|
||||||
flatConfig = true;
|
flatConfig = true;
|
||||||
actionIsOptional = config.plugins.which-key.enable;
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -38,9 +37,7 @@ in {
|
||||||
keymaps = mkOption {
|
keymaps = mkOption {
|
||||||
type =
|
type =
|
||||||
types.listOf
|
types.listOf
|
||||||
(helpers.keymaps.mkMapOptionSubmodule {
|
(helpers.keymaps.mkMapOptionSubmodule {});
|
||||||
actionIsOptional = config.plugins.which-key.enable;
|
|
||||||
});
|
|
||||||
default = [];
|
default = [];
|
||||||
example = [
|
example = [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue