{
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 = "[[]]";
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 = "";
action = "2ToggleTerm";
options.desc = "Open/Close Terminal 2";
}
{
mode = "t";
key = "";
action = "wincmd h";
options.desc = "Go to Left window";
}
{
mode = "t";
key = "";
action = "wincmd l";
options.desc = "Go to Right window";
}
{
mode = "t";
key = "";
action = "wincmd k";
options.desc = "Go to Up window";
}
{
mode = "t";
key = "";
action = "wincmd j";
options.desc = "Go to Down window";
}
];
}