revert(nvim): update Harpoon mappings

This reverts commit e05aadef34.
This commit is contained in:
Oliver Davies 2023-11-23 11:54:55 +00:00
parent 024384303f
commit ad4b86b8a3

View file

@ -1,18 +1,23 @@
require("harpoon").setup {}
local status_ok, harpoon = pcall(require, "harpoon")
if not status_ok then
return
end
local nmap = require("opdavies.keymap").nmap
local mark = require "harpoon.mark"
local ui = require "harpoon.ui"
harpoon.setup {}
nmap { "<C-e>", ui.toggle_quick_menu }
nmap { "<leader>a", mark.add_file }
nmap { "<M-h><M-l>", require("harpoon.ui").toggle_quick_menu }
nmap { "<M-h><M-m>", require("harpoon.mark").add_file }
for key, letter in ipairs { "h", "j", "k", "l" } do
nmap { "<leader>hl", require("harpoon.ui").toggle_quick_menu }
nmap { "<leader>hm", require("harpoon.mark").add_file }
for i = 1, 5 do
nmap {
string.format("<C-%s>", letter),
string.format("<space>%s", i),
function()
ui.nav_file(key)
require("harpoon.ui").nav_file(i)
end,
}
end