dotfiles/nix/nvim/toggleterm.nix

33 lines
639 B
Nix
Raw Normal View History

2024-03-19 22:57:23 +01:00
{
configs,
pkgs,
2024-03-19 22:57:23 +01:00
...
}: {
programs.nixvim = {
plugins.toggleterm = {
enable = true;
direction = "horizontal";
insertMappings = false;
2024-03-19 22:57:23 +01:00
};
keymaps = [
{
action = "function() Floatingterm:toggle() end";
key = "<leader>s";
lua = true;
2024-03-19 22:57:23 +01:00
mode = "n";
options = {
silent = true;
desc = "toggle scratch terminal";
};
}
];
extraConfigLuaPre = ''
local Terminal = require('toggleterm.terminal').Terminal
Floatingterm = Terminal:new({
hidden = true,
direction = "float"
})
'';
};
}