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