Skip to content
Snippets Groups Projects
Verified Commit c6fbc74c authored by iliya.saroukha's avatar iliya.saroukha :first_quarter_moon:
Browse files

fix: updated harpoon2 config (using add function instead of append)

parent c9895b85
No related branches found
No related tags found
No related merge requests found
local harpoon = require("harpoon")
-- harpoon:setup()
-- REQUIRED
harpoon:setup()
harpoon:setup({})
-- REQUIRED
vim.keymap.set("n", "<leader>a", function() harpoon:list():append() end)
-- basic telescope configuration
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
vim.keymap.set("n", "<C-e>", function() toggle_telescope(harpoon:list()) end,
{ desc = "Open harpoon window" })
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end)
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
vim.keymap.set("n", "<C-s>", function() harpoon:list():select(1) end)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment