harpoon icon indicating copy to clipboard operation
harpoon copied to clipboard

Error loading buffer for marked file

Open Halleyscomet0855 opened this issue 11 months ago • 2 comments

WARNING If this is about Harpoon1, the issue will be closed. All support and everything of harpoon1 will be frozen on master until 4/20 or 6/9 and then harpoon2 will become master

Please use harpoon2 for branch

Steps to reproduce:

  1. Mark 2 different files.
  2. Exit and reenter nvim.
  3. Use keybinding to open 1 file, then the other file.
  4. Expected behaviour: Each file becomes open in their own buffer.
  5. Actual behaviour: The first file opens in a buffer, then trying to open the next file results in the following error:
E5108: Error executing lua: BufWinEnter Autocommands for "*"..function <SNR>28_Highlight_Matching_Pair, line 149: Vim(call):E801: ID already taken: 3
stack traceback:
        [C]: in function 'bufload'
        ...ey/.local/share/nvim/lazy/harpoon/lua/harpoon/config.lua:111: in function 'select'
        ...lley/.local/share/nvim/lazy/harpoon/lua/harpoon/list.lua:182: in function 'select'
        /home/halley/.config/nvim/lua/plugins/harpoon.lua:12: in function </home/halley/.config/nvim/lua/plugins/ha
rpoon.lua:12>

Guesswork: From my intuition, the error occurs because it's trying to open two different files in the same buffer, which neovim really doesn't like. This intuition is further supported when I have a bufferline plugin installed, as attempting to continue past the error has the second file being loaded, but not be in a buffer (i.e., the file is in some form of ghost buffer). Saving appears to work, however.

Halleyscomet0855 avatar Mar 17 '24 04:03 Halleyscomet0855

Technical note: The error message is very similar to issue #534

abeldekat avatar Mar 23 '24 10:03 abeldekat

i'll try to repo this along with the other one linked. that is for tomorrow though.

i'll try to be dedicating ~30 minutes a day to harpoon2 to get it off the ground

ThePrimeagen avatar Apr 03 '24 22:04 ThePrimeagen