feat:add_nixvim

This commit is contained in:
dichgrem
2025-09-21 15:54:31 +08:00
parent c36f91562d
commit 8016a1173d
64 changed files with 3608 additions and 30 deletions

View File

@@ -0,0 +1,65 @@
{
plugins.toggleterm = {
enable = true;
settings = {
size = ''
function(term)
if term.direction == "horizontal" then
return 30
elseif term.direction == "vertical" then
return vim.o.columns * 0.4
end
end
'';
open_mapping = "[[<C-/>]]";
hide_numbers = true;
shade_terminals = true;
start_in_insert = true;
terminal_mappings = true;
persist_mode = true;
insert_mappings = true;
close_on_exit = true;
shell = "nu";
direction = "horizontal"; # 'vertical' | 'horizontal' | 'tab' | 'float'
float_opts = {
border = "single"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
width = 80;
height = 20;
winblend = 0;
};
};
};
keymaps = [
{
mode = "t";
key = "<C-g>";
action = "<cmd>2ToggleTerm<cr>";
options.desc = "Open/Close Terminal 2";
}
{
mode = "t";
key = "<C-Left>";
action = "<cmd>wincmd h<cr>";
options.desc = "Go to Left window";
}
{
mode = "t";
key = "<C-Right>";
action = "<cmd>wincmd l<cr>";
options.desc = "Go to Right window";
}
{
mode = "t";
key = "<C-Up>";
action = "<cmd>wincmd k<cr>";
options.desc = "Go to Up window";
}
{
mode = "t";
key = "<C-Down>";
action = "<cmd>wincmd j<cr>";
options.desc = "Go to Down window";
}
];
}