LintaoAmons / bookmarks.nvim

Persistent bookmarks: powerful but simple (one shortcut to add, rename, and remove bookmark)
https://lintao-index.pages.dev/docs/Vim/Neovim/my-plugins-docs/bookmarks.nvim/
MIT License
166 stars 6 forks source link

isolate the db file #32

Closed shanlihou closed 1 month ago

shanlihou commented 1 month ago

For now, if I open multiple nvim and with different session, if I save bookmark, the db file will cover each other that leading to conflicts. So add API to reset the db file path. for example in my nvim lua to open different json db for different session.

local function restore_bookmark()
  local cwd = vim.fn.getcwd()
  require('bookmarks').api.reset_new_db_path(cwd)
end

local opts = {
  post_restore_cmds = { restore_bookmark },
}

require('auto-session').setup(opts)
LintaoAmons commented 1 month ago

Please help to check if the cache is removed and the function is working as expected when you working at multiple nvim instances

shanlihou commented 1 month ago

ok,I will pull and test

shanlihou commented 1 month ago

test ok