Files
dotfiles/.config/nvim/lua/plugins/harpoon.lua
Stefan Imhoff a41290c297 feat(nix): nix and back again
I tried Nix, but it had too many downsides so I removed it.

1. Didn't like that all files are immutable and simple config changes
need a complete rebuild.
2. Setting up a new Mac didn't work as smoothly as promised. Not worth
the effort.
3. It sucked a lot to always have to type in the password twice on each
darwin-rebuild
4. It solves problems I never had.
2024-08-07 17:49:02 +02:00

64 lines
1.2 KiB
Lua

-- Getting you where you want with the fewest keystrokes
-- https://github.com/ThePrimeagen/harpoon
return {
"ThePrimeagen/harpoon",
branch = "harpoon2",
keys = {
{
"<leader>a",
function()
require("harpoon"):list():add()
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 = {
menu = {
width = vim.api.nvim_win_get_width(0) - 4,
},
},
}