mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
chore(nvim): upgrade to Harpoon 2
This commit is contained in:
@@ -18,6 +18,7 @@ require("lazy").setup({
|
||||
{ import = "lazyvim.plugins.extras.coding.copilot" },
|
||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||
{ import = "lazyvim.plugins.extras.editor.aerial" },
|
||||
{ import = "lazyvim.plugins.extras.editor.harpoon2" },
|
||||
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{ import = "lazyvim.plugins.extras.lang.ruby" },
|
||||
|
||||
@@ -2,24 +2,62 @@
|
||||
-- https://github.com/ThePrimeagen/harpoon
|
||||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
dependencies = "nvim-telescope/telescope.nvim",
|
||||
-- stylua: ignore
|
||||
branch = "harpoon2",
|
||||
keys = {
|
||||
{ "<leader>a", function() require("harpoon.mark").add_file() end, desc = "Harpoon Add File" },
|
||||
{ "<leader>;", function() require("harpoon.ui").toggle_quick_menu() end, desc = "Harpoon Toggle Quickmenu" },
|
||||
{ "<leader>1", function() require("harpoon.ui").nav_file(1) end, desc = "Harpoon Buffer 1" },
|
||||
{ "<leader>2", function() require("harpoon.ui").nav_file(2) end, desc = "Harpoon Buffer 2" },
|
||||
{ "<leader>3", function() require("harpoon.ui").nav_file(3) end, desc = "Harpoon Buffer 3" },
|
||||
{ "<leader>4", function() require("harpoon.ui").nav_file(4) end, desc = "Harpoon Buffer 4" },
|
||||
{
|
||||
"<leader>a",
|
||||
function()
|
||||
require("harpoon"):list():append()
|
||||
end,
|
||||
desc = "Harpoon Add File",
|
||||
},
|
||||
{
|
||||
"<leader>;",
|
||||
function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end,
|
||||
desc = "Harpoon Quickmenu",
|
||||
},
|
||||
{
|
||||
"<leader>1",
|
||||
function()
|
||||
require("harpoon"):list():select(1)
|
||||
end,
|
||||
desc = "Harpoon Buffer 1",
|
||||
},
|
||||
{
|
||||
"<leader>2",
|
||||
function()
|
||||
require("harpoon"):list():select(2)
|
||||
end,
|
||||
desc = "Harpoon Buffer 2",
|
||||
},
|
||||
{
|
||||
"<leader>3",
|
||||
function()
|
||||
require("harpoon"):list():select(3)
|
||||
end,
|
||||
desc = "Harpoon Buffer 3",
|
||||
},
|
||||
{
|
||||
"<leader>4",
|
||||
function()
|
||||
require("harpoon"):list():select(4)
|
||||
end,
|
||||
desc = "Harpoon Buffer 4",
|
||||
},
|
||||
{
|
||||
"<leader>5",
|
||||
function()
|
||||
require("harpoon"):list():select(5)
|
||||
end,
|
||||
desc = "Harpoon Buffer 5",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
global_settings = {
|
||||
mark_branch = true,
|
||||
menu = {
|
||||
width = vim.api.nvim_win_get_width(0) - 4,
|
||||
},
|
||||
width = vim.api.nvim_win_get_width(0) - 4,
|
||||
},
|
||||
config = function()
|
||||
require("harpoon").setup()
|
||||
require("telescope").load_extension("harpoon")
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user