harpoon icon indicating copy to clipboard operation
harpoon copied to clipboard

Error opening files after adding basic config

Open 4b6169736572 opened this issue 1 year ago • 4 comments

Here's the error:

Error executing lua callback: Vim:E474: Error while dumping encode_tv2json() argument, key 'refresh_projects_b4update': attempt to dump function reference
stack traceback:
        [C]: in function 'json_encode'
        ...iser/.local/share/nvim/lazy/harpoon/lua/harpoon/init.lua:174: in function 'save'
        ...iser/.local/share/nvim/lazy/harpoon/lua/harpoon/mark.lua:18: in function 'emit_changed'
        ...iser/.local/share/nvim/lazy/harpoon/lua/harpoon/mark.lua:281: in function 'store_offset'
        ...iser/.local/share/nvim/lazy/harpoon/lua/harpoon/init.lua:20: in function <...iser/.local/share/nvim/lazy/harpoon/lua/harpoon/init.lua:19>

And heres my harpoon.lua:

return { 'theprimeagen/harpoon',
branch = "harpoon2",
config = function()
     local harpoon = require("harpoon")
     harpoon:setup()
end}

I've narrowed it down to just the above code.

Here's my fs if that's any help: image

4b6169736572 avatar Jun 15 '24 20:06 4b6169736572

Ignore reopen/close I pressed the wrong issue.

4b6169736572 avatar Jun 16 '24 15:06 4b6169736572

Yep, same problem. It's triggered by harpoon:setup()

Doesn't happen on v0.9 but does on v0.11.0-dev-573+g58406ab9f-Homebrew (brew install neovim --HEAD).

Sorry, I know that's not much of a bisection but hopefully a start anyway :)

@4b6169736572 what version are you seeing it on?

scanny avatar Aug 04 '24 04:08 scanny

+1, just added basic config and it triggers the same error. I'll keep checking if perhaps the load order is wrong, and post any update here.

:version
NVIM v0.11.0
Build type: RelWithDebInfo
LuaJIT 2.1.1741730670
$ uname -mra
Linux laptop 6.14.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 07 Apr 2025 19:59:13 +0000 x86_64 GNU/Linux

amlcx avatar Apr 14 '25 17:04 amlcx