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

Harpoon doesn't remember my marks after close #577

Open
camerondugan opened this issue Apr 16, 2024 · 7 comments
Open

Harpoon doesn't remember my marks after close #577

camerondugan opened this issue Apr 16, 2024 · 7 comments

Comments

@camerondugan
Copy link

I get the issue only on commits 3e32576 and later.

Harpoon works just fine while nvim is open, but when I close nvim, it forgets the marks. I'm guessing this commit's hashing thing doesn't work for me.

Temporary solution for users:

Pin your version to e76cb03 in your plugin manager of choice. For lazy, just add commit = 'e76cb03', then run :Lazy sync. If it doesn't work right away, you can restart nvim and it should work now.

@floork
Copy link

floork commented Apr 17, 2024

Could it be that you use Git-Worktrees? If so, it's a duplicate of #551

@camerondugan
Copy link
Author

Could it be that you use Git-Worktrees? If so, it's a duplicate of #551

I don't use Git-Worktrees. I tested like this:

  • Open new terminal
  • using nvim to :cd to project folder
  • add a few marks, then quitting nvim
  • then running nvim again
  • nvim :cd to project folder again
  • the crtl+e to see no marks
  • other shortcuts also don't take me to file's I marked

@floork
Copy link

floork commented Apr 17, 2024

Ok, I can confirm that it's not working and that it is the same behavior as with the Git-Worktrees (tested on 0378a6c)

@maxrzaw
Copy link

maxrzaw commented May 19, 2024

I think this bug is due to the startup sequence when a custom key is provided.

In Harpoon:new(), Data:new() is called with the default config, which loads an empty list from the hash for cwd. Then that empty list writes over the hash for the custom key when the list is synced.

@FreshHead
Copy link

FreshHead commented May 30, 2024

I am still geting this bug when using git branch as key for separate list per branch. Commit hash is 0378a6c.
When I close neovim all files in my list is gone.

Right now I switched on e76cb03 as camerondugan sugessted.

@bwpge
Copy link

bwpge commented Jun 4, 2024

Just wanted to chime in I'm also having this issue on Windows with a super basic setup (no special list names or anything, just a keymap for require("harpoon"):list():add()). Pinning to e76cb03 also worked for me.

@ArisPodotas
Copy link

Just got this too

I'm on windows 11
nvim 0.10.0
using the most recent harpoon 2 commit

My experience is a little different because it was initially working and i was using my repo just fine the way i had it setup from the first time ever adding jumps to the repo but upon trying to edit the list form my first use in the repo i got the problem described before. Suddenly any new instance of vim would wipe the list, except for one of the pre set files.

Now I tried the solution of pinning the e76cb03 commit and it worked for me too

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

6 participants