mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-01-07 13:08:49 +01:00
Add the auto session plugin for saving and reloading projects
This commit is contained in:
parent
211627d542
commit
56f34c4753
11
config/nvim/plugins/auto-session.lua
Normal file
11
config/nvim/plugins/auto-session.lua
Normal file
@ -0,0 +1,11 @@
|
||||
local auto_session = require("auto-session")
|
||||
|
||||
auto_session.setup({
|
||||
auto_restore_enabled = false,
|
||||
auto_session_suppress_dirs = { "~/", "~/Dev/", "~/Downloads", "~/Documents", "~/Desktop/" },
|
||||
})
|
||||
|
||||
local keymap = vim.keymap
|
||||
|
||||
keymap.set("n", "<leader>wr", "<cmd>SessionRestore<CR>", { desc = "Restore session for cwd" }) -- restore last workspace session for current directory
|
||||
keymap.set("n", "<leader>ws", "<cmd>SessionSave<CR>", { desc = "Save session for auto session root dir" }) -- save workspace session for current working directory
|
@ -184,6 +184,7 @@ in
|
||||
];
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
alpha-nvim
|
||||
auto-session
|
||||
nvim-treesitter.withAllGrammars
|
||||
lualine-nvim
|
||||
nvim-web-devicons
|
||||
@ -204,6 +205,7 @@ in
|
||||
${builtins.readFile ../../config/nvim/keymaps.lua}
|
||||
${builtins.readFile ../../config/nvim/options.lua}
|
||||
${builtins.readFile ../../config/nvim/plugins/alpha.lua}
|
||||
${builtins.readFile ../../config/nvim/plugins/auto-session.lua}
|
||||
${builtins.readFile ../../config/nvim/plugins/nvim-tree.lua}
|
||||
${builtins.readFile ../../config/nvim/plugins/telescope.lua}
|
||||
${builtins.readFile ../../config/nvim/plugins/treesitter.lua}
|
||||
|
Loading…
Reference in New Issue
Block a user