olimorris / persisted.nvim

💾 Simple session management for Neovim with git branching, autoloading and Telescope support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auto delete buffers and chdir when switching sessions

iujakchu opened this issue · comments

buffers are not closed when using telescope.
I have to use this workaround:

telescope = { -- options for the telescope extension                         
    -- jump between session smoothly                                         
    after_source = function(param)                                           
        vim.api.nvim_command "%bd"                                           
        local path = param.dir_path                                          
        print(path)                                                          
        if string.find(path, "/") ~= 1 then                                  
            vim.api.nvim_command("cd " .. vim.fn.expand "~" .. "/" .. path)  
            vim.api.nvim_command("tcd " .. vim.fn.expand "~" .. "/" .. path) 
        else                                                                 
            vim.api.nvim_command("cd " .. path)                              
            vim.api.nvim_command("tcd " .. path)                             
        end                                                                  
    end,                                                                     
},                                                                           

make this by default?

commented

Hey @iujakchu and thanks for raising. That is exactly what the callbacks are there for; so everyone can customise their use of the plugin without opinionated defaults

commented

Could you add this to #29 though?

Could you add this to #29 though?

Ok.Thanks for you awesome plugin!