This commit is contained in:
xqtc 2024-09-19 18:24:14 +02:00
parent ee98175ab1
commit 2e521aa7d8

View file

@ -29,6 +29,9 @@
colorschemes.catppuccin.enable = true;
plugins = {
persistence = {
enable = true;
};
navic = {
enable = true;
settings = {
@ -89,7 +92,26 @@
winbar = {
lualine_c = [
{
__unkeyed-1 = "navic";
__unkeyed-1 = "aerial";
colored = true;
cond = {
__raw = ''
function()
local buf_size_limit = 1024 * 1024
if vim.api.nvim_buf_get_offset(0, vim.api.nvim_buf_line_count(0)) > buf_size_limit then
return false
end
return true
end
'';
};
dense = false;
dense_sep = ".";
depth = {
__raw = "nil";
};
sep = " ";
}
];
# lualine_x = [
@ -186,6 +208,7 @@
nixvimInjections = true;
settings = {
ensure_installed = "all";
highlight.enable = true;
};
};
treesitter-refactor = {
@ -529,6 +552,50 @@
'';
lua = true;
}
{
mode = ["n"];
key = "<leader>qs";
action = ''
function()
require("persistence").load()
end
'';
lua = true;
options.desc = "Load the session for the current directory";
}
{
mode = ["n"];
key = "<leader>qS";
action = ''
function()
require("persistence").select()
end
'';
lua = true;
options.desc = "Select a session to load";
}
{
mode = ["n"];
key = "<leader>ql";
action = ''
function()
require("persistence").load({ last = true })
end
'';
lua = true;
options.desc = "Load the last session";
}
{
mode = ["n"];
key = "<leader>qd";
action = ''
function()
require("persistence").stop()
end
'';
lua = true;
options.desc = "Stop persistence";
}
];
};
}