Add persistence session manager, remove auto-session, add keys to

dashboard in snacks
This commit is contained in:
Martin Larsson 2025-02-24 14:55:08 +00:00
parent aa0b453a10
commit deba4a64a6
3 changed files with 19 additions and 20 deletions

View file

@ -1,19 +0,0 @@
return {
"rmagatti/auto-session",
opts = {
log_level = "error",
auto_session_suppress_dirs = {
"/",
"~/",
"~/Projects",
"~/Downloads",
"~/Development",
"~/Dev",
"~/Dev/Git",
"~/.config",
},
},
init = function()
vim.o.sessionoptions = "localoptions"
end
}

View file

@ -0,0 +1,5 @@
return {
"folke/persistence.nvim",
event = "BufReadPre", -- this will only start session saving when an actual file was opened
opts = {}
}

View file

@ -8,7 +8,20 @@ return {
what = "repo", what = "repo",
}, },
picker = { enabled = true, }, picker = { enabled = true, },
dashboard = { enabled = true, }, dashboard = {
enabled = true,
preset = {
keys = {
{ icon = "", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" },
{ icon = "", key = "n", desc = "New File", action = ":ene | startinsert" },
{ icon = "", key = "g", desc = "Find Text", action = ":lua Snacks.dashboard.pick('live_grep')" },
{ icon = "", key = "c", desc = "Config", action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})" },
{ icon = "", key = "s", desc = "Restore Session", section = "session" },
{ icon = "󰒲 ", key = "L", desc = "Lazy", action = ":Lazy", enabled = package.loaded.lazy ~= nil },
{ icon = "", key = "q", desc = "Quit", action = ":qa" },
},
},
},
debug = { enabled = true, }, debug = { enabled = true, },
indent = { indent = {
enabled = true, enabled = true,