feat: apply new module format to terminal plugins

This commit is contained in:
NotAShelf 2023-02-27 22:28:37 +03:00
parent 848fc5f57c
commit cbf1490308
No known key found for this signature in database
GPG key ID: 5B5C8895F28445F1
4 changed files with 31 additions and 15 deletions

View file

@ -1,5 +1,5 @@
_: {
imports = [
./toggleterm.nix
./toggleterm
];
}

View file

@ -8,20 +8,6 @@ with lib;
with builtins; let
cfg = config.vim.terminal.toggleterm;
in {
options.vim.terminal.toggleterm = {
enable = mkEnableOption "Enable toggleterm as a replacement to built-in terminal command";
direction = mkOption {
type = types.enum ["horizontal" "vertical" "tab" "float"];
default = "float";
description = "Direction of the terminal";
};
enable_winbar = mkOption {
type = types.bool;
default = false;
description = "Enable winbar";
};
};
config = mkIf cfg.enable {
vim.startPlugins = [
"toggleterm-nvim"

View file

@ -0,0 +1,6 @@
_: {
imports = [
./toggleterm.nix
./config.nix
];
}

View file

@ -0,0 +1,24 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.terminal.toggleterm;
in {
options.vim.terminal.toggleterm = {
enable = mkEnableOption "Enable toggleterm as a replacement to built-in terminal command";
direction = mkOption {
type = types.enum ["horizontal" "vertical" "tab" "float"];
default = "horizontal";
description = "Direction of the terminal";
};
enable_winbar = mkOption {
type = types.bool;
default = false;
description = "Enable winbar";
};
};
}