add(nvim): improved harpoon and telescope

killed barbar
search buffer with telescope
jump to buffer with harpoon
This commit is contained in:
Léana 江 2023-04-01 12:46:59 +02:00
parent c0bcbda34b
commit 877477eedc
6 changed files with 52 additions and 62 deletions

View file

@ -0,0 +1,33 @@
require("harpoon").setup {}
local ui = require("harpoon.ui")
local mark = require("harpoon.mark")
-- add and view
vim.keymap.set({ 'n', 'i' },
'<A-a>',
function() mark.add_file() end, { noremap = true, desc = "add file to harpoon" }
)
vim.keymap.set({ 'n', 'i' },
'<A-e>',
function() ui.toggle_quick_menu() end,
{ noremap = true, desc = "show harpoon menu" }
)
-- switch it up!
vim.keymap.set({ 'n', 'i' },
'<A-h>',
function() ui.nav_file(1) end, { noremap = true, desc = "harpoon 1 (the magic finger)" }
)
vim.keymap.set({ 'n', 'i' },
'<A-t>',
function() ui.nav_file(2) end, { noremap = true, desc = "harpoon 2" }
)
vim.keymap.set({ 'n', 'i' },
'<A-n>',
function() ui.nav_file(3) end, { noremap = true, desc = "harpoon 3" }
)
vim.keymap.set({ 'n', 'i' },
'<A-s>',
function() ui.nav_file(4) end, { noremap = true, desc = "harpoon 4" }
)