ThePrimeagen/harpoon

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

Opened this issue · 3 comments

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!

Hmm, that's not good

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.

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.