session management

This commit is contained in:
♥ Minnie ♥ 2025-05-15 11:09:32 +08:00
parent b5b7fdebc6
commit 19c2b7744a
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
4 changed files with 34 additions and 0 deletions

View file

@ -11,6 +11,7 @@
./plugins/cmp/cmp.nix
# Editor plugins and configurations
./plugins/editor/sessions.nix
./plugins/editor/buffers.nix
./plugins/editor/comment.nix
./plugins/editor/treesitter.nix

View file

@ -8,11 +8,15 @@
clipboard = "unnamedplus";
conceallevel = 1;
updatetime=100;
undofile = true;
# Tabs & Spaces
tabstop = 2;
softtabstop = 2;
shiftwidth = 2;
expandtab = true;
# Using this config for sessionoptions is recommended:
sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions";
};
}

View file

@ -0,0 +1,21 @@
{ ... }: {
plugins.auto-session = {
enable = true;
settings = {
pre_save_cmds = ["Neotree close"];
post_restore_cmds = ["Neotree show"];
};
};
keymaps = [
{
mode = ["n"];
key = "<leader>ss";
action = ":SessionSearch<cr>";
options = {
desc = "Search sessions";
silent = true;
};
}
];
}

View file

@ -1,7 +1,15 @@
{...}: {
plugins.neo-tree = {
enable = true;
autoCleanAfterSessionRestore = true;
closeIfLastWindow = true;
eventHandlers = {
neo_tree_window_after_open = ''
function(_)
vim.cmd("wincmd =")
end
'';
};
};
keymaps = [