mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-30 23:54:29 +02:00
feat: added persistence
This commit is contained in:
parent
e7c5d8a470
commit
ece9533206
4 changed files with 35 additions and 0 deletions
|
@ -147,6 +147,7 @@ return {
|
|||
["<leader>g"] = { name = "+git" },
|
||||
["<leader>h"] = { name = "+help" },
|
||||
["<leader>n"] = { name = "+noice" },
|
||||
["<leader>q"] = { name = "+quit/session" },
|
||||
["<leader>s"] = { name = "+search" },
|
||||
["<leader>x"] = { name = "+diagnostics" },
|
||||
})
|
||||
|
|
|
@ -9,6 +9,36 @@ return {
|
|||
end,
|
||||
},
|
||||
|
||||
-- session management
|
||||
{
|
||||
"folke/persistence.nvim",
|
||||
event = "BufReadPre",
|
||||
config = { options = { "buffers", "curdir", "tabpages", "winsize", "help" } },
|
||||
keys = {
|
||||
{
|
||||
"<leader>qs",
|
||||
function()
|
||||
require("persistence").load()
|
||||
end,
|
||||
desc = "Restore Session",
|
||||
},
|
||||
{
|
||||
"<leader>ql",
|
||||
function()
|
||||
require("persistence").load({ last = true })
|
||||
end,
|
||||
desc = "Restore Last Session",
|
||||
},
|
||||
{
|
||||
"<leader>qd",
|
||||
function()
|
||||
require("persistence").stop()
|
||||
end,
|
||||
desc = "Delete Current Session",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- library used by other plugins
|
||||
"nvim-lua/plenary.nvim",
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue