nix-config/modules/home-manager/terminal/nvim/toggleterm.nix

35 lines
702 B
Nix
Raw Normal View History

2024-03-24 17:39:49 -05:00
{
configs,
pkgs,
...
}: {
programs.nixvim = {
plugins.toggleterm = {
enable = true;
direction = "horizontal";
insertMappings = false;
2024-03-30 15:13:40 -05:00
openMapping = ''<c-\>'';
terminalMappings = false;
2024-03-24 17:39:49 -05:00
};
keymaps = [
{
action = "function() Floatingterm:toggle() end";
key = "<leader>s";
lua = true;
mode = "n";
options = {
silent = true;
desc = "toggle scratch terminal";
};
}
];
extraConfigLuaPre = ''
local Terminal = require('toggleterm.terminal').Terminal
Floatingterm = Terminal:new({
hidden = true,
direction = "float"
})
'';
};
}