summaryrefslogtreecommitdiff
path: root/lua/plugins/harpoon.lua
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-05-23 19:10:50 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2024-05-23 19:10:50 -0400
commitc95b9108768ca734fa94ed99b0979f56f097d4bf (patch)
tree94b2c7afbd1c5e04d6ac638c57e9fe21634b2fae /lua/plugins/harpoon.lua
parent04042907c77f9790f78df0b6af52dbdd6e89ca55 (diff)
Commented telescope in case I want it (harpoon)
Diffstat (limited to 'lua/plugins/harpoon.lua')
-rw-r--r--lua/plugins/harpoon.lua27
1 files changed, 25 insertions, 2 deletions
diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua
index 45f25a4..9a8942e 100644
--- a/lua/plugins/harpoon.lua
+++ b/lua/plugins/harpoon.lua
@@ -1,12 +1,35 @@
return {
"theprimeagen/harpoon",
branch = "harpoon2",
- dependencies = {"nvim-lua/plenary.nvim"},
+ dependencies = {
+ "nvim-lua/plenary.nvim",
+ "nvim-telescope/telescope.nvim"
+ },
config = function()
local harpoon = require("harpoon")
- harpoon:setup()
+ harpoon:setup({})
+ -- -- basic telescope config
+ -- local conf = require("telescope.config").values
+ -- local function toggle_telescope(harpoon_files)
+ -- local file_paths = {}
+ -- for _, item in ipairs(harpoon_files.items) do
+ -- table.insert(file_paths, item.value)
+ -- end
+
+ -- require("telescope.pickers").new({}, {
+ -- prompt_title = "Harpoon",
+ -- finder = require("telescope.finders").new_table({
+ -- results = file_paths,
+ -- }),
+ -- previewer = conf.file_previewer({}),
+ -- sorter = conf.generic_sorter({}),
+ -- }):find()
+ -- end
+
+ -- harpoon keybindings
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end )
+ -- vim.keymap.set("n", "<C-e>", function() toggle_telescope(harpoon:list()) end, {desc = "Open harpoon window"} )
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end )
vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1)end )