diff --git a/configs/nvim/lua/plugins/basic.lua b/configs/nvim/lua/plugins/basic.lua index 2d5afab..5af61cd 100644 --- a/configs/nvim/lua/plugins/basic.lua +++ b/configs/nvim/lua/plugins/basic.lua @@ -21,16 +21,18 @@ return { end end end - ---@diagnostic disable-next-line: missing-fields require('auto-session').setup({ auto_session_suppress_dirs = { '~' }, pre_save_cmds = { clean_buffers }, + cwd_change_handling = true, + pre_cwd_changed_cmds = { clean_buffers }, session_lens = { load_on_setup = false, }, }) vim.keymap.set('n', 'sr', 'SessionRestore', { desc = 'Restore session' }) vim.keymap.set('n', 'ss', 'SessionSave', { desc = 'Save session' }) + vim.keymap.set('n', 'fs', 'SessionSearch', { desc = 'Find session' }) end, }, { 'dstein64/vim-startuptime', cmd = 'StartupTime' }, diff --git a/configs/nvim/lua/plugins/search.lua b/configs/nvim/lua/plugins/search.lua index 1a1228e..3ebefb1 100644 --- a/configs/nvim/lua/plugins/search.lua +++ b/configs/nvim/lua/plugins/search.lua @@ -5,7 +5,6 @@ return { dependencies = { { 'nvim-lua/plenary.nvim' }, { 'nvim-telescope/telescope-z.nvim' }, - 'rmagatti/auto-session', }, config = function() require('telescope').load_extension('z') @@ -37,8 +36,6 @@ return { ) vim.keymap.set('n', 'ft', require('telescope.builtin').treesitter, { desc = 'List item by treesitter' }) vim.keymap.set('n', 'z', require('telescope').extensions.z.list, { desc = 'Find path by z' }) - require('auto-session').setup_session_lens() - vim.keymap.set('n', 'fs', require('auto-session.session-lens').search_session, { desc = 'Find session' }) end, }, } diff --git a/configs/nvim/lua/plugins/startup.lua b/configs/nvim/lua/plugins/startup.lua index d85850d..04074d1 100644 --- a/configs/nvim/lua/plugins/startup.lua +++ b/configs/nvim/lua/plugins/startup.lua @@ -50,7 +50,7 @@ local function config() require('telescope').extensions.z.list() end), button('s', '󰉓 Open Session', function() - require('auto-session.session-lens').search_session() + vim.cmd('SessionSearch') end), button('u', '󰚰 Plugin update', function() require('lazy').sync()