Removed harpoon
This commit is contained in:
+1
-2
@@ -6,7 +6,6 @@
|
||||
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "31217271a7314c343606acb4072a94a039a19fb5" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
@@ -16,7 +15,7 @@
|
||||
"nvim": { "branch": "main", "commit": "beaf41a30c26fd7d6c386d383155cbd65dd554cd" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "d1597791f8196519439b3a036b59b09023981e1d" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "f4e9d367d4e067d7a5fabc9fd3f1349b291eb718" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "a0db8bf7d6488b1dcd9cb5b0dfd6684a1e14f769" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "9f2dad22ef8bb14fd1e0a3aa8859cdc88170668b" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
|
||||
|
||||
@@ -34,6 +34,22 @@ end, { desc = "Toggle inline diagnostics" })
|
||||
vim.keymap.set("n", "]b", "<cmd>bnext<cr>", { desc = "Next buffer" })
|
||||
vim.keymap.set("n", "[b", "<cmd>bprevious<cr>", { desc = "Previous buffer" })
|
||||
|
||||
-- Go to buffer controlls 1-9
|
||||
for i = 1, 9 do
|
||||
vim.keymap.set("n", "<leader>" .. i, function()
|
||||
local bufs = vim.fn.getbufinfo({ buflisted = 1 })
|
||||
if bufs[i] then
|
||||
vim.api.nvim_set_current_buf(bufs[i].bufnr)
|
||||
end
|
||||
end, { desc = "Go to buffer " .. i })
|
||||
end
|
||||
-- Delete current buffer (without closing window)
|
||||
vim.keymap.set("n", "<leader>bd", function()
|
||||
local current = vim.api.nvim_get_current_buf()
|
||||
vim.cmd("bnext")
|
||||
vim.cmd("bdelete " .. current)
|
||||
end, { desc = "Delete buffer" })
|
||||
|
||||
-- Toggle terminal in a bottom split
|
||||
vim.keymap.set("n", "<leader>tt", function()
|
||||
vim.cmd("botright split | resize 15 | terminal")
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2", -- IMPORTANT: use maintained version
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon:setup()
|
||||
|
||||
|
||||
|
||||
-- Add current file
|
||||
vim.keymap.set("n", "<leader>ha", function()
|
||||
harpoon:list():add()
|
||||
end, { desc = "Harpoon add file" })
|
||||
|
||||
-- Toggle quick menu
|
||||
vim.keymap.set("n", "<leader>hm", function()
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end, { desc = "Harpoon menu" })
|
||||
|
||||
-- Remove current file from harpoon
|
||||
vim.keymap.set("n", "<leader>hr", function()
|
||||
require("harpoon"):list():remove()
|
||||
end, { desc = "Harpoon: remove file" })
|
||||
|
||||
-- Jump to files
|
||||
vim.keymap.set("n", "<leader>1", function()
|
||||
harpoon:list():select(1)
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>2", function()
|
||||
harpoon:list():select(2)
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>3", function()
|
||||
harpoon:list():select(3)
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>4", function()
|
||||
harpoon:list():select(4)
|
||||
end)
|
||||
|
||||
-- Optional: cycle
|
||||
vim.keymap.set("n", "<C-S-P>", function()
|
||||
harpoon:list():prev()
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<C-S-N>", function()
|
||||
harpoon:list():next()
|
||||
end)
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user