From 2e5e8d4f5b14752797e68d7f180b3e6b8d0cdb64 Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Fri, 26 Jul 2024 15:24:49 +0700 Subject: [PATCH] removed 1-5 keys from telescope and used for harpoon mappings instead --- lua/plugins/harpoon2.lua | 32 ++++++++++++++++++++++++++++++++ lua/plugins/telescope.lua | 10 ---------- 2 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 lua/plugins/harpoon2.lua delete mode 100644 lua/plugins/telescope.lua diff --git a/lua/plugins/harpoon2.lua b/lua/plugins/harpoon2.lua new file mode 100644 index 0000000..5f683ea --- /dev/null +++ b/lua/plugins/harpoon2.lua @@ -0,0 +1,32 @@ +return { + "ThePrimeagen/harpoon", + keys = function() + local keys = { + { + "H", + function() + require("harpoon"):list():add() + end, + desc = "Harpoon File", + }, + { + "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, +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua deleted file mode 100644 index 83e8c29..0000000 --- a/lua/plugins/telescope.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - keys = { - { "1", "Telescope buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, - { "2", LazyVim.pick "files", desc = "Find Files (Root Dir)" }, - { "3", LazyVim.pick "live_grep", desc = "Grep (Root Dir)" }, - { "4", "Telescope quickfix", desc = "Quickfix List" }, - { "5", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, - }, -}