Closed oalders closed 1 month ago
I see that this has been fixed in the newest version. I upgraded this morning and the map is preserved. I am, however, now seeing:
Error executing vim.schedule lua callback: ...hare/nvim/lazy/neominimap.nvim/lua/neominimap/buffer.lua:99: Invalid buffer id: 1
stack traceback:
[C]: in function 'nvim_buf_get_lines'
...hare/nvim/lazy/neominimap.nvim/lua/neominimap/buffer.lua:99: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
May I know your vim.o.sessionoptions
?
blank,buffers,curdir,folds,help,tabpages,winsize,terminal
Could you please provide the minimal full Neovim configuration? I am unable to reproduce this bug.
It turns out I cannot replicate this with a minimal configuration. Apologies for not trying this in advance. I'll close this issue and re-open if I can figure out which plugin is causing the interaction. Thanks for your help!
Although I cannot reproduce this bug, I came up with a hack based on your description: turn the minimap off and on again on the PersistedLoadPost event.
vim.api.nvim_create_autocmd({ "User" }, {
group = vim.api.nvim_create_augroup("persisted", { clear = true }),
pattern = "PersistedLoadPost",
callback = function()
vim.cmd("Neominimap off")
vim.cmd("Neominimap on")
end,
})
I hope this works.
Thanks for looking into this. It looks like with the latest version of the plugin and your hack I now get:
Error executing vim.schedule lua callback: .../share/nvim/lazy/neominimap.nvim/lua/neominimap/util.lua:12: Invalid window id: 1003 stack traceback: [C]: in function 'f' .../share/nvim/lazy/neominimap.nvim/lua/neominimap/util.lua:12: in function '' vim/_editor.lua: in function <vim/_editor.lua:0>
Describe the bug
To Reproduce I'm using
olimorris/persisted.nvim
to manage sessions. The maps work fine in a new session. If I exitneovim
and then re-enter the session I just left, no map appears and the error above is displayed.Expected behavior Ideally the plugin would pick up where it left off. In this case, there's just no more map.
Please complete the following information:
Additional context My
lazy.nvim
config:I can
NeominimpaClose
and thenNeominimapOpen
to revive the map.