session management
This commit is contained in:
parent
b5b7fdebc6
commit
eae19b0c19
|
@ -13,6 +13,7 @@
|
|||
# Editor plugins and configurations
|
||||
./plugins/editor/buffers.nix
|
||||
./plugins/editor/comment.nix
|
||||
./plugins/editor/sessions.nix
|
||||
./plugins/editor/treesitter.nix
|
||||
|
||||
# UI plugins
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
}
|
||||
|
|
21
config/plugins/editor/sessions.nix
Normal file
21
config/plugins/editor/sessions.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
|
@ -1,6 +1,13 @@
|
|||
{...}: {
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
eventHandlers = {
|
||||
neo_tree_window_after_open = ''
|
||||
function(_)
|
||||
vim.cmd("wincmd =")
|
||||
end
|
||||
'';
|
||||
};
|
||||
closeIfLastWindow = true;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue