diff options
Diffstat (limited to 'lua/plugins/maps.lua')
-rw-r--r-- | lua/plugins/maps.lua | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/lua/plugins/maps.lua b/lua/plugins/maps.lua new file mode 100644 index 0000000..ab10383 --- /dev/null +++ b/lua/plugins/maps.lua @@ -0,0 +1,36 @@ +local M = {} +local maps = {} + +maps.gitsigns = { + n = { + ["<leader>gb"] = { + -- TODO: remov fun + function() + package.loaded.gitsigns.blame_line() + end, + "Blame line", + }, + + ["<leader>td"] = { + function() + require("gitsigns").toggle_deleted() + end, + "Toggle deleted", + }, + }, +} + +M.load = function(name, opts) + local submaps = maps[name] + opts = opts or {} + + vim.schedule(function() + for mode, keytab in pairs(submaps) do + for key, fun in pairs(keytab) do + vim.keymap.set(mode, key, fun[1], { desc = fun[2] }, opts) + end + end + end) +end + +return M |