diff --git a/modules/keymaps.nix b/modules/keymaps.nix index fa4787dc..b75cf954 100644 --- a/modules/keymaps.nix +++ b/modules/keymaps.nix @@ -117,14 +117,13 @@ in (helpers.genMaps "c" config.maps.command); in { - # TODO: Use vim.keymap.set if on nvim >= 0.7 extraConfigLua = optionalString (mappings != [ ]) '' -- Set up keybinds {{{ do local __nixvim_binds = ${helpers.toLuaObject mappings} for i, map in ipairs(__nixvim_binds) do - vim.api.nvim_set_keymap(map.mode, map.key, map.action, map.config) + vim.keymap.set(map.mode, map.key, map.action, map.config) end end -- }}} diff --git a/tests/flake.nix b/tests/flake.nix index 735e6910..1a23bdee 100644 --- a/tests/flake.nix +++ b/tests/flake.nix @@ -81,6 +81,10 @@ }; }; + keymaps = build { + maps.normal."," = "echo \"test\""; + }; + issue-40 = build-stable { plugins = { nix.enable = true;