mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-24 17:58:38 +02:00
colorschemes/nord: switch to mkPlugin
This commit is contained in:
parent
20c1ae069e
commit
3be30efc3b
1 changed files with 39 additions and 46 deletions
|
@ -1,58 +1,51 @@
|
|||
{
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.colorschemes.nord;
|
||||
in {
|
||||
} @ args:
|
||||
with lib;
|
||||
with import ../helpers.nix {inherit lib;};
|
||||
mkPlugin args {
|
||||
name = "nord";
|
||||
description = "nord.nvim";
|
||||
package = pkgs.vimPlugins.nord-nvim;
|
||||
globalPrefix = "nord_";
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
contrast = mkDefaultOpt {
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Make sidebars and popup menus like nvim-tree and telescope have a different background.
|
||||
'';
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
colorscheme = "nord";
|
||||
extraPlugins = [cfg.package];
|
||||
borders = mkDefaultOpt {
|
||||
type = types.bool;
|
||||
description = "Enable the border between verticaly split windows visable.";
|
||||
};
|
||||
|
||||
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;
|
||||
disable_background = mkDefaultOpt {
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Disable the setting of background color so that NeoVim can use your terminal background.
|
||||
'';
|
||||
};
|
||||
|
||||
cursorline_transparent = mkDefaultOpt {
|
||||
type = types.bool;
|
||||
description = "Set the cursorline transparent/visible.";
|
||||
};
|
||||
|
||||
enable_sidebar_background = mkDefaultOpt {
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Re-enables the background of the sidebar if you disabled the background of everything.
|
||||
'';
|
||||
};
|
||||
|
||||
italic = mkDefaultOpt {
|
||||
type = types.bool;
|
||||
description = "Enables/disables italics.";
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue