diff options
author | kylo252 <[email protected]> | 2021-08-05 16:35:58 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-08-05 10:35:58 -0400 |
commit | 67de24227f7244dc0f8a7ba90ad9d594e9bf4717 (patch) | |
tree | 26d17f7fac54d869e892218aca02a8f93363e1e0 /lua/utils/keymap.lua | |
parent | 76a16b6676183af564359c53184de1ebf6028b37 (diff) |
chore: remove unncessary logic from utils (#1238)
Diffstat (limited to 'lua/utils/keymap.lua')
-rw-r--r-- | lua/utils/keymap.lua | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lua/utils/keymap.lua b/lua/utils/keymap.lua deleted file mode 100644 index 1799e21f..00000000 --- a/lua/utils/keymap.lua +++ /dev/null @@ -1,31 +0,0 @@ -local M = {} - -local mode_adapters = { - insert_mode = "i", - normal_mode = "n", - term_mode = "t", - visual_mode = "v", - visual_block_mode = "x", -} - --- Load key mappings for a given mode --- @param mode The keymap mode, can be one of the keys of mode_adapters --- @param keymaps The list of key mappings --- @param opts The mapping options -M.load_mode = function(mode, keymaps, opts) - mode = mode_adapters[mode] and mode_adapters[mode] or mode - for key, mapping in pairs(keymaps) do - vim.api.nvim_set_keymap(mode, key, mapping[1], opts) - end -end - --- Load key mappings for all provided modes --- @param keymaps A list of key mappings for each mode --- @param opts The mapping options for each mode -M.load = function(keymaps, opts) - for mode, mapping in pairs(keymaps) do - M.load_mode(mode, mapping, opts[mode]) - end -end - -return M |