Add session manager

This commit is contained in:
Tyler Hallada 2022-10-07 12:20:43 -04:00
parent 3eef0ec19e
commit 0c3101e386
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" }, requires = { "nvim-lua/plenary.nvim" },
} }
use 'dhruvasagar/vim-zoom' 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 -- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins -- 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('emoji')
require('telescope').load_extension('ui-select') require('telescope').load_extension('ui-select')
require('telescope').load_extension('project') require('telescope').load_extension('project')
require('telescope').load_extension('session-lens')
vim.keymap.set( vim.keymap.set(
'n', 'n',
@ -154,3 +155,9 @@ vim.keymap.set(
[[<Cmd>lua require('telescope').extensions.project.project({ display_type = 'full' })<CR>]], [[<Cmd>lua require('telescope').extensions.project.project({ display_type = 'full' })<CR>]],
{ noremap = true, silent = true } { 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 -- Window decorations
vim.opt.title = true vim.opt.title = true
vim.opt.titlestring="%{substitute(getcwd(),$HOME,'~','')} - Neovide"
-- Leader -- Leader
vim.g.mapleader = ' ' vim.g.mapleader = ' '