nvim: switch to harpoon2, change menu/add keys
This commit is contained in:
parent
f3b5b49899
commit
9c1613f567
@ -112,36 +112,6 @@ vim.keymap.set("n", "<leader>ss", "<cmd>source ~/.config/nvim/after/plugin/luasn
|
||||
|
||||
key('t', '<C-_>', '<C-\\><C-n>')
|
||||
|
||||
-- harpoon
|
||||
|
||||
key('n', '<leader>ha', function()
|
||||
require("harpoon.mark").add_file()
|
||||
end, { desc = '[H]arpoon [a]dd' })
|
||||
|
||||
key('n', '<leader>hm', function()
|
||||
require("harpoon.ui").toggle_quick_menu()
|
||||
end, { desc = '[H]arpoon toggle quick [m]enu' })
|
||||
|
||||
key('n', '<leader>hj', function()
|
||||
require("harpoon.ui").nav_next()
|
||||
end, { desc = '[H]arpoon next (j)' })
|
||||
|
||||
key('n', '<leader>hk', function()
|
||||
require("harpoon.ui").nav_prev()
|
||||
end, { desc = '[H]arpoon prev (k)' })
|
||||
|
||||
for i = 1, 9, 1 do
|
||||
key('n', '<M-' .. i .. '>', function()
|
||||
require("harpoon.ui").nav_file(i)
|
||||
end, { desc = '[H]arpoon nav_file [' .. i .. ']' })
|
||||
end
|
||||
|
||||
for i = 1, 9, 1 do
|
||||
key('n', '<leader>T' .. i, function()
|
||||
require("harpoon.term").gotoTerminal(i)
|
||||
end, { desc = '[H]arpoon nav_file [' .. i .. ']' })
|
||||
end
|
||||
|
||||
-- colors
|
||||
|
||||
key('n', '<F6>', function()
|
||||
|
17
nvim/.config/nvim/lua/plugins/harpoon.lua
Normal file
17
nvim/.config/nvim/lua/plugins/harpoon.lua
Normal file
@ -0,0 +1,17 @@
|
||||
return {
|
||||
{
|
||||
'ThePrimeagen/harpoon',
|
||||
branch = 'harpoon2',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local harpoon = require "harpoon"
|
||||
harpoon:setup()
|
||||
vim.keymap.set('n', '<leader>i', function() harpoon:list():append() end, { desc = "Harpoon add new [I]tem" })
|
||||
vim.keymap.set('n', '<leader>m', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end,
|
||||
{ desc = "Harpoon [M]enu" })
|
||||
for i = 1, 9, 1 do
|
||||
vim.keymap.set('n', '<M-' .. i .. '>', function() harpoon:list():select(i) end)
|
||||
end
|
||||
end
|
||||
},
|
||||
}
|
@ -1,10 +1,4 @@
|
||||
return {
|
||||
{
|
||||
'ThePrimeagen/harpoon',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
lazy = true,
|
||||
},
|
||||
|
||||
{
|
||||
'crusj/hierarchy-tree-go.nvim',
|
||||
dependencies = 'neovim/nvim-lspconfig',
|
||||
|
Loading…
x
Reference in New Issue
Block a user