Closed bassamsdata closed 5 months ago
It is now persisted by filename, what do you mean by neovim instances? like clear them when quit?
Thanks for the prompt reply. Currently, when I quit Neovim and reopen the file, all local buffers bookmarks are gone. Is there a way to keep them like the the usual arrow global items/files.
Maybe it is a bug, the location is a json file in ~/.cache/nvim/arrow/, can you check it? Here is related code.
thanks.
yes, I believe there's a bug here. When I lazy load the plugin based on keys (meaning opening the filename before the plugin), all the local-buffer bookmarks disappear, no matter what I do.
But when I lazy load based on event = "BufReadPost"
or lazy = false
, for example, it works fine and the buffer-bookmarks persist.
I had this in my config:
{
"otavioschwanck/arrow.nvim",
cmd = "Arrow open",
keys = {
{ "<tab>" },
{ "," },
},
}
Another thing I noticed is that there isn't just one JSON file in the .cache/nvim/arrow
directory. For every file I save bookmarks for, there's a corresponding file with no extension, but it's a JSON file. Below is a screenshot of the directory; I only have two files bookmarked.
meaning opening the filename before the plugin
That’s the problem. We don’t load files while lazy loading, so the initial state will be empty table, then after you open menu, we sync that empty state to disk that overwrites the original one.
Hello, thanks for the plugin!
I'm wondering if there's a way to persist buffer-local bookmarks across Neovim instances. I'd like to implement this but not sure where to begin. Any guidance, @xzbdmw, would be greatly appreciated.