local map = vim.api.nvim_set_keymap local harp = require('harpoon.ui') local harpmap = function(cmd, cb) map('n', cmd, '', { noremap = true, silent = true, callback = cb, }) end local nav_file = function(n) return function() harp.nav_file(n) end end harpmap('h', require('harpoon.mark').add_file) harpmap('fh', harp.toggle_quick_menu) harpmap('1', nav_file(1)) harpmap('2', nav_file(2)) harpmap('3', nav_file(3)) harpmap('4', nav_file(4)) harpmap('5', nav_file(5)) harpmap('6', nav_file(6)) harpmap('7', nav_file(7)) harpmap('8', nav_file(8)) harpmap('9', nav_file(9))