Add persistence session manager, remove auto-session, add keys to
dashboard in snacks
This commit is contained in:
parent
aa0b453a10
commit
deba4a64a6
3 changed files with 19 additions and 20 deletions
|
|
@ -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
|
|
||||||
}
|
|
||||||
5
nvim/lua/plugs/persistence.lua
Normal file
5
nvim/lua/plugs/persistence.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
return {
|
||||||
|
"folke/persistence.nvim",
|
||||||
|
event = "BufReadPre", -- this will only start session saving when an actual file was opened
|
||||||
|
opts = {}
|
||||||
|
}
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue