Add session manager

This commit is contained in:
Tyler Hallada 2023-12-01 15:26:00 -05:00
parent 820e560b09
commit e17bba6e97
6 changed files with 36 additions and 1 deletions

View File

@ -355,6 +355,19 @@ return require('packer').startup(function(use)
requires = { "nvim-lua/plenary.nvim" },
}
use 'dhruvasagar/vim-zoom'
use {
'rmagatti/auto-session',
config = function()
require('plugins.auto-session')
end
}
use {
'rmagatti/session-lens',
requires = {'rmagatti/auto-session', 'nvim-telescope/telescope.nvim'},
config = function()
require('plugins.session-lens')
end
}
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins

View File

@ -0,0 +1,7 @@
vim.o.sessionoptions='blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal'
require('auto-session').setup({
log_level = 'error',
auto_session_suppress_dirs = { '~/', '~/workspace', '~/Downloads', '/'},
auto_session_enable_last_session = true,
})

View File

@ -1 +1,7 @@
require('lualine').setup()
require('lualine').setup({
sections = {
lualine_c = {
require('auto-session-library').current_session_name
}
}
})

View File

@ -0,0 +1 @@
require('session-lens').setup()

View File

@ -27,6 +27,7 @@ require('telescope').load_extension('env')
require('telescope').load_extension('emoji')
require('telescope').load_extension('ui-select')
require('telescope').load_extension('project')
require('telescope').load_extension('session-lens')
vim.keymap.set(
'n',
@ -154,3 +155,9 @@ vim.keymap.set(
[[<Cmd>lua require('telescope').extensions.project.project({ display_type = 'full' })<CR>]],
{ noremap = true, silent = true }
)
vim.keymap.set(
'n',
'<leader>`',
[[<Cmd>lua require('session-lens').search_session()<CR>]],
{ noremap = true, silent = true }
)

View File

@ -31,6 +31,7 @@ vim.opt.mouse = 'a'
-- Window decorations
vim.opt.title = true
vim.opt.titlestring="%{substitute(getcwd(),$HOME,'~','')} - Neovide"
-- Leader
vim.g.mapleader = ' '