You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi - I love harpoon. thanks for making this. It is absolutely incredible for working on features in big projects.
I've found one little use that I haven't been able to resolve. I like to keep my key unbound in normal mode - in particular because I have bindings that I use a LOT to .
Here is my harpoon setup - Notice the first comment, following "--- I'd like to unbind this.". More specifically, if you bind to , the hotkey C-m also stops working for some reason.
Any ideas what could be going on - or a better solution? I'd like to keep bound when the menu is open of course, but I don't like accidentally hitting and having my harpoon menu be toggled back open when I'm just iterating on some code (I mash to iterate through trouble.nvim)
local harpoon = require("harpoon")
harpoon:setup();
-- I'd like to unbind this - but for some reason it
-- breaks harpoon + Telescope
-- vim.keymap.set('n', '<cr>', '<nop>');
-- basic telescope configuration
local conf = require("telescope.config").values
local function toggle_telescope(harpoon_files)
local make_finder = function()
local paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(paths, item.value)
end
return require("telescope.finders").new_table(
{
results = paths
}
)
end
require("telescope.pickers").new({}, {
prompt_title = "Harpoon",
finder = make_finder(),
previewer = conf.file_previewer({}),
sorter = conf.generic_sorter({}),
attach_Mappings = function(prompt_buffer_number, map)
map(
"i",
"<C-d>", -- your mapping here
function()
local state = require("telescope.actions.state")
local selected_entry = state.get_selected_entry()
local current_picker = state.get_current_picker(prompt_buffer_number)
harpoon:list():removeAt(selected_entry.index)
current_picker:refresh(make_finder())
end
)
return true
end
}):find()
end
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
vim.keymap.set("n", "<C-m>", function()
harpoon:list():add()
toggle_telescope(harpoon:list())
end)
The text was updated successfully, but these errors were encountered:
Hi - I love harpoon. thanks for making this. It is absolutely incredible for working on features in big projects.
I've found one little use that I haven't been able to resolve. I like to keep my key unbound in normal mode - in particular because I have bindings that I use a LOT to .
Here is my harpoon setup - Notice the first comment, following "--- I'd like to unbind this.". More specifically, if you bind to , the hotkey C-m also stops working for some reason.
Any ideas what could be going on - or a better solution? I'd like to keep bound when the menu is open of course, but I don't like accidentally hitting and having my harpoon menu be toggled back open when I'm just iterating on some code (I mash to iterate through trouble.nvim)
The text was updated successfully, but these errors were encountered: