mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-12-27 21:22:23 +00:00
keymaps: fix null key problems
This commit is contained in:
parent
66d0a81206
commit
745da4539e
2 changed files with 3 additions and 3 deletions
|
@ -32,7 +32,7 @@
|
|||
mapConfigOptions
|
||||
// {
|
||||
key = mkOption {
|
||||
type = str;
|
||||
type = nullOr str;
|
||||
description = "The key that triggers this keybind.";
|
||||
};
|
||||
mode = mkOption {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
}: let
|
||||
inherit (builtins) map mapAttrs filter;
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.strings) concatLines concatMapStringsSep optionalString;
|
||||
inherit (lib.strings) concatLines concatMapStringsSep;
|
||||
inherit (lib.trivial) showWarnings;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.nvim.dag) entryAfter mkLuarcSection resolveDag entryAnywhere;
|
||||
|
@ -43,7 +43,7 @@ in {
|
|||
|
||||
toLuaKeymap = bind: "vim.keymap.set(${toLuaObject bind.mode}, ${toLuaObject bind.key}, ${toLuaObject (getAction bind)}, ${toLuaObject (getOpts bind)})";
|
||||
|
||||
keymaps = concatLines (map toLuaKeymap cfg.keymaps);
|
||||
keymaps = concatLines (map toLuaKeymap (filter (x: x.key != null) cfg.keymaps));
|
||||
in {
|
||||
vim = {
|
||||
luaConfigRC = {
|
||||
|
|
Loading…
Reference in a new issue