niuiic / multiple-session.nvim

Session manager for neovim
MIT License
9 stars 0 forks source link

Feature request #1

Closed I-Own-You closed 1 year ago

I-Own-You commented 1 year ago

Hi! I am using your plugin a while since, its great so far but i encountered a problem that resulted in willing to request a feature.

I am using fzf-lua plugin. There are 2 special commands:

  • :FzfLua buffers - opens a window with all buffers and i can switch them.
  • :FzfLua lines - shows all lines from all opened buffers. When i leave neovim with a bunch of buffers, and enter it again, i ended up on the buffer i lastly was, thats correct, and when i use :FzfLua buffers, it shows only the buffer i am in, the others are not shown, the same way acts :FzfLua lines. I asked about this mechanic the [fzf-lua](https://github.com/ibhagwan/fzf-lua) maintainer and he said i should ask you instead for the request. Could you make that all buffers are loaded and not only the buffer i end up on entering neovim ? It could be something like a property in setup() method *pre_load_buffers = true*
  • niuiic commented 1 year ago

    This plugin simply use mks(:h mksession) to create session and use source to restore session. All buffers are surely retored, but I'm not sure if they are loaded in the way you expected.

    You can try adding vim.cmd("bufdo e") or any other command to reload buffers in on_session_restored, to see if it works as you expected.

    Alternatively, you can use "toppair/reach.nvim" to switch buffers, and "nvim-telescope/telescope.nvim" to search content. They must be able to work properly.

    I-Own-You commented 1 year ago

    This plugin simply use mks(:h mksession) to create session and use source to restore session. All buffers are surely retored, but I'm not sure if they are loaded in the way you expected.

    You can try adding vim.cmd("bufdo e") or any other command to reload buffers in on_session_restored, to see if it works as you expected.

    Alternatively, you can use "toppair/reach.nvim" to switch buffers, and "nvim-telescope/telescope.nvim" to search content. They must be able to work properly.

    Adding vim.cmd("bufdo e") to on_session_restored worked!