removed 1-5 keys from telescope and used for harpoon mappings instead

This commit is contained in:
Tigor Hutasuhut 2024-07-26 15:24:49 +07:00
parent 6a461c2779
commit 2e5e8d4f5b
2 changed files with 32 additions and 10 deletions

32
lua/plugins/harpoon2.lua Normal file
View file

@ -0,0 +1,32 @@
return {
"ThePrimeagen/harpoon",
keys = function()
local keys = {
{
"<leader>H",
function()
require("harpoon"):list():add()
end,
desc = "Harpoon File",
},
{
"<leader>h",
function()
local harpoon = require "harpoon"
harpoon.ui:toggle_quick_menu(harpoon:list())
end,
desc = "Harpoon Quick Menu",
},
}
for i = 1, 5 do
table.insert(keys, {
tostring(i),
function()
require("harpoon"):list():select(i)
end,
desc = "Harpoon to File " .. i,
})
end
return keys
end,
}

View file

@ -1,10 +0,0 @@
return {
"nvim-telescope/telescope.nvim",
keys = {
{ "1", "<cmd>Telescope buffers sort_mru=true sort_lastused=true<cr>", desc = "Buffers" },
{ "2", LazyVim.pick "files", desc = "Find Files (Root Dir)" },
{ "3", LazyVim.pick "live_grep", desc = "Grep (Root Dir)" },
{ "4", "<cmd>Telescope quickfix<cr>", desc = "Quickfix List" },
{ "5", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" },
},
}