Revert "colorschemes/nord: switch to mkPlugin"

This reverts commit 3be30efc3b.
This commit is contained in:
Gaetan Lepage 2024-01-16 00:06:44 +01:00 committed by Gaétan Lepage
parent ec00c47ddf
commit 9f2d766f28

View file

@ -1,51 +1,58 @@
{ {
lib, lib,
helpers,
config,
pkgs, pkgs,
... ...
} @ args: }:
with lib; with lib; let
with import ../helpers.nix {inherit lib;}; cfg = config.colorschemes.nord;
mkPlugin args { in {
name = "nord"; options = {
description = "nord.nvim"; colorschemes.nord = {
package = pkgs.vimPlugins.nord-nvim; enable = mkEnableOption "nord";
globalPrefix = "nord_";
options = { package = helpers.mkPackageOption "nord.vim" pkgs.vimPlugins.nord-nvim;
contrast = mkDefaultOpt {
type = types.bool;
description = ''
Make sidebars and popup menus like nvim-tree and telescope have a different background.
'';
};
borders = mkDefaultOpt { contrast =
type = types.bool; mkEnableOption
description = "Enable the border between verticaly split windows visable."; "Make sidebars and popup menus like nvim-tree and telescope have a different background";
};
disable_background = mkDefaultOpt { borders =
type = types.bool; mkEnableOption
description = '' "Enable the border between verticaly split windows visable";
Disable the setting of background color so that NeoVim can use your terminal background.
'';
};
cursorline_transparent = mkDefaultOpt { disable_background =
type = types.bool; mkEnableOption
description = "Set the cursorline transparent/visible."; "Disable the setting of background color so that NeoVim can use your terminal background";
};
enable_sidebar_background = mkDefaultOpt { cursorline_transparent =
type = types.bool; mkEnableOption
description = '' "Set the cursorline transparent/visible";
Re-enables the background of the sidebar if you disabled the background of everything.
'';
};
italic = mkDefaultOpt { enable_sidebar_background =
type = types.bool; mkEnableOption
description = "Enables/disables italics."; "Re-enables the background of the sidebar if you disabled the background of everything";
italic = mkOption {
description = "enables/disables italics";
type = types.nullOr types.bool;
default = null;
}; };
}; };
} };
config = mkIf cfg.enable {
colorscheme = "nord";
extraPlugins = [cfg.package];
globals = {
nord_contrast = mkIf cfg.contrast 1;
nord_borders = mkIf cfg.borders 1;
nord_disable_background = mkIf cfg.disable_background 1;
nord_cursoline_transparent = mkIf cfg.cursorline_transparent 1;
nord_enable_sidebar_background = mkIf cfg.enable_sidebar_background 1;
nord_italic = mkIf (cfg.italic != null) cfg.italic;
};
};
}