diff options
author | Luc Sinet <[email protected]> | 2021-08-02 17:19:44 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-08-02 11:19:44 -0400 |
commit | 6d14d7b5da54fffabfec18b2b09a488d3661d7f9 (patch) | |
tree | e5f0532c0bdd028b597faf3c2bc6d5cd2748a6f3 /lua/utils/keymap.lua | |
parent | 8e88bf52587c99d1070258f03500cbbdb9b1420c (diff) |
[Refactor] Adopt which key mapping style (#1210)
* Refactor keymappings to match which-key style
* Update confif example + remove redundant way of registering mappings
Diffstat (limited to 'lua/utils/keymap.lua')
-rw-r--r-- | lua/utils/keymap.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/utils/keymap.lua b/lua/utils/keymap.lua index 121a4888..1799e21f 100644 --- a/lua/utils/keymap.lua +++ b/lua/utils/keymap.lua @@ -14,8 +14,8 @@ local mode_adapters = { -- @param opts The mapping options M.load_mode = function(mode, keymaps, opts) mode = mode_adapters[mode] and mode_adapters[mode] or mode - for _, keymap in ipairs(keymaps) do - vim.api.nvim_set_keymap(mode, keymap[1], keymap[2], opts) + for key, mapping in pairs(keymaps) do + vim.api.nvim_set_keymap(mode, key, mapping[1], opts) end end |