Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HARPOON2 - I can add harpoon menu to the harpoon jump list. #506

Open
ktappdev opened this issue Jan 27, 2024 · 3 comments
Open

HARPOON2 - I can add harpoon menu to the harpoon jump list. #506

ktappdev opened this issue Jan 27, 2024 · 3 comments

Comments

@ktappdev
Copy link

image

Run the append new function while looking at the quick jump list, close the quick jump list and reopen it.

This doesn't bother me and it's not a big deal, just thought I would share to help make this the best it can be.
Absolutely love this product btw. Great Job All!

@ThePrimeagen
Copy link
Owner

Hmm, that's not good

@nickcoffey
Copy link

I've played around with a couple solutions and for now the only thing I've come up with is to have an ignoreBuffers table that has some default strings in it like __harpoon-menu. Then you can do a string.find on that table here in Harpoon:append and here in Harpoon:prepend before adding it to the list.

I'm also seeing this for other buffers like NvimTree. Adding every single possible unwanted buffer is impossible, so an optional ignoreBuffers table option could be exposed in the config to extend the base ignoreBuffers mentioned above. That way people can avoid whatever unwanted buffers they want, depending on their setup.

@nickcoffey
Copy link

Okay, I think I have a better solution now. Instead of the ignoreBuffers approach, vim.bo.buftype can be checked before append or prepend. According to the docs the buftype will be empty for a normal buffer. Buffers like NvimTree have a type of nowrite and the Harpoon jumplist has a type of acwrite. Only adding empty buftype buffers to the jumplist should fix this problem. I'll start working on a PR to implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants