Update Harpoon configuration

Replace usages of custom keybinding functions with `vim.keymap.set()`.
This commit is contained in:
Oliver Davies 2024-05-16 18:09:49 +01:00
parent f5931909a1
commit c40a03a456

View file

@ -3,21 +3,16 @@ require("harpoon").setup()
local mark = require "harpoon.mark" local mark = require "harpoon.mark"
local ui = require "harpoon.ui" local ui = require "harpoon.ui"
local nmap = require("opdavies.keymap").nmap vim.keymap.set("n", "<M-h><M-l>", ui.toggle_quick_menu)
vim.keymap.set("n", "<M-h><M-m>", mark.add_file)
nmap { "<M-h><M-l>", ui.toggle_quick_menu } vim.keymap.set("n", "<leader>ha", mark.add_file)
nmap { "<M-h><M-m>", mark.add_file } vim.keymap.set("n", "<leader>hc", mark.clear_all)
vim.keymap.set("n", "<leader>ho", ui.toggle_quick_menu)
nmap { "<leader>ha", mark.add_file } vim.keymap.set("n", "<leader>hr", mark.rm_file)
nmap { "<leader>hc", mark.clear_all }
nmap { "<leader>ho", ui.toggle_quick_menu }
nmap { "<leader>hr", mark.rm_file }
for i = 1, 5 do for i = 1, 5 do
nmap { vim.keymap.set("n", string.format("<space>%s", i), function()
string.format("<space>%s", i), ui.nav_file(i)
function() end)
ui.nav_file(i)
end,
}
end end