Add session manager
This commit is contained in:
parent
820e560b09
commit
e17bba6e97
@ -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
|
||||
|
7
lua/plugins/auto-session.lua
Normal file
7
lua/plugins/auto-session.lua
Normal 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,
|
||||
})
|
@ -1 +1,7 @@
|
||||
require('lualine').setup()
|
||||
require('lualine').setup({
|
||||
sections = {
|
||||
lualine_c = {
|
||||
require('auto-session-library').current_session_name
|
||||
}
|
||||
}
|
||||
})
|
||||
|
1
lua/plugins/session-lens.lua
Normal file
1
lua/plugins/session-lens.lua
Normal file
@ -0,0 +1 @@
|
||||
require('session-lens').setup()
|
@ -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 }
|
||||
)
|
||||
|
@ -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 = ' '
|
||||
|
Loading…
Reference in New Issue
Block a user