diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-03-01 07:36:14 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-03-01 10:11:03 +0530 |
commit | 573066d74e9ac58377863e215abd061ba10ed6ab (patch) | |
tree | 187e3de7e2a906092abd2674f14aa98a9eeceb03 /lua/plugins/maps.lua | |
parent | ae3fbcc55c32c05225a5f911fb6a991a8c214ca8 (diff) |
plugins: init
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 |