session management
This commit is contained in:
parent
b5b7fdebc6
commit
19c2b7744a
4 changed files with 34 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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,7 +1,15 @@
|
|||
{...}: {
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
autoCleanAfterSessionRestore = true;
|
||||
closeIfLastWindow = true;
|
||||
eventHandlers = {
|
||||
neo_tree_window_after_open = ''
|
||||
function(_)
|
||||
vim.cmd("wincmd =")
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue