Skip to content

Commit

Permalink
fix(neovim): after update of auto-session
Browse files Browse the repository at this point in the history
  • Loading branch information
nanozuki committed Aug 31, 2024
1 parent edd8944 commit 4eedc91
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 3 additions & 1 deletion configs/nvim/lua/plugins/basic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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', '<leader>sr', '<cmd>SessionRestore<cr>', { desc = 'Restore session' })
vim.keymap.set('n', '<leader>ss', '<cmd>SessionSave<cr>', { desc = 'Save session' })
vim.keymap.set('n', '<leader>fs', '<cmd>SessionSearch<cr>', { desc = 'Find session' })
end,
},
{ 'dstein64/vim-startuptime', cmd = 'StartupTime' },
Expand Down
3 changes: 0 additions & 3 deletions configs/nvim/lua/plugins/search.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -37,8 +36,6 @@ return {
)
vim.keymap.set('n', '<leader>ft', require('telescope.builtin').treesitter, { desc = 'List item by treesitter' })
vim.keymap.set('n', '<leader>z', require('telescope').extensions.z.list, { desc = 'Find path by z' })
require('auto-session').setup_session_lens()
vim.keymap.set('n', '<leader>fs', require('auto-session.session-lens').search_session, { desc = 'Find session' })
end,
},
}
2 changes: 1 addition & 1 deletion configs/nvim/lua/plugins/startup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ local function config()
require('telescope').extensions.z.list()
end),
button('<leader>s', '󰉓 Open Session', function()
require('auto-session.session-lens').search_session()
vim.cmd('SessionSearch')
end),
button('<leader>u', '󰚰 Plugin update', function()
require('lazy').sync()
Expand Down

0 comments on commit 4eedc91

Please sign in to comment.