added enable option to nvim

changed home-manager personal config namespace from home.* to user.*
This commit is contained in:
Gabe Venberg 2024-05-29 13:40:03 -05:00
parent 322788aa3a
commit 6f0e167087
30 changed files with 539 additions and 525 deletions

View file

@ -1,36 +1,39 @@
{
configs,
config,
lib,
pkgs,
...
}: {
programs.nixvim = {
plugins.toggleterm = {
enable = true;
settings = {
direction = "horizontal";
insert_mappings = false;
terminal_mappings = false;
open_mapping = ''[[<c-\>]]'';
};
};
keymaps = [
{
action = "function() Floatingterm:toggle() end";
key = "<leader>s";
lua = true;
mode = "n";
options = {
silent = true;
desc = "toggle scratch terminal";
config = lib.mkIf config.user.nvim.enable {
programs.nixvim = {
plugins.toggleterm = {
enable = true;
settings = {
direction = "horizontal";
insert_mappings = false;
terminal_mappings = false;
open_mapping = ''[[<c-\>]]'';
};
}
];
extraConfigLuaPre = ''
local Terminal = require('toggleterm.terminal').Terminal
Floatingterm = Terminal:new({
hidden = true,
direction = "float"
})
'';
};
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"
})
'';
};
};
}