modules/terminal: switch to explicit lib calls

This commit is contained in:
raf 2024-03-12 03:47:27 +03:00
commit 32c2e7733a
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
4 changed files with 43 additions and 36 deletions

View file

@ -1,29 +1,30 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib) mkEnableOption mkOption types mkMappingOption;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.nvim.binds) mkMappingOption;
inherit (lib.types) nullOr str enum bool package;
in {
options.vim.terminal.toggleterm = {
enable = mkEnableOption "toggleterm as a replacement to built-in terminal command";
mappings = {
open = mkOption {
type = types.nullOr types.str;
type = nullOr str;
description = "The keymapping to open toggleterm";
default = "<c-t>";
};
};
direction = mkOption {
type = types.enum ["horizontal" "vertical" "tab" "float"];
type = enum ["horizontal" "vertical" "tab" "float"];
default = "horizontal";
description = "Direction of the terminal";
};
enable_winbar = mkOption {
type = types.bool;
type = bool;
default = false;
description = "Enable winbar";
};
@ -31,13 +32,13 @@ in {
lazygit = {
enable = mkEnableOption "LazyGit integration";
direction = mkOption {
type = types.enum ["horizontal" "vertical" "tab" "float"];
type = enum ["horizontal" "vertical" "tab" "float"];
default = "float";
description = "Direction of the lazygit window";
};
package = mkOption {
type = with types; nullOr package;
type = nullOr package;
default = pkgs.lazygit;
description = "The package that should be used for lazygit. Setting it to null will attempt to use lazygit from your PATH";
};