1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 11:36:07 +01:00
nixvim/plugins/colorschemes/nord.nix
2023-02-20 10:42:13 +00:00

58 lines
1.6 KiB
Nix

{
pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.colorschemes.nord;
helpers = import ../helpers.nix {inherit lib;};
in {
options = {
colorschemes.nord = {
enable = mkEnableOption "nord";
package = helpers.mkPackageOption "nord.vim" pkgs.vimPlugins.nord-nvim;
contrast =
mkEnableOption
"Make sidebars and popup menus like nvim-tree and telescope have a different background";
borders =
mkEnableOption
"Enable the border between verticaly split windows visable";
disable_background =
mkEnableOption
"Disable the setting of background color so that NeoVim can use your terminal background";
cursorline_transparent =
mkEnableOption
"Set the cursorline transparent/visible";
enable_sidebar_background =
mkEnableOption
"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;
};
};
}