mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
Add gruvbox options
This commit is contained in:
parent
a0fe9e6ca4
commit
32728e5ea9
2 changed files with 129 additions and 1 deletions
|
@ -33,7 +33,10 @@
|
|||
programs.nixvim = {
|
||||
enable = true;
|
||||
package = pkgs.neovim-nightly;
|
||||
colorschemes.gruvbox.enable = true;
|
||||
colorschemes.gruvbox = {
|
||||
enable = true;
|
||||
italics = true;
|
||||
};
|
||||
|
||||
options.number = true;
|
||||
|
||||
|
|
|
@ -2,10 +2,111 @@
|
|||
with lib;
|
||||
let
|
||||
cfg = config.programs.nixvim.colorschemes.gruvbox;
|
||||
colors = types.enum [ "bg" "red" "green" "yellow" "blue" "purple" "aqua" "gray" "fg" "bg0_h" "bg0" "bg1" "bg2" "bg3" "bg4" "gray" "orange" "bg0_s" "fg0" "fg1" "fg2" "fg3" "fg4" ];
|
||||
in {
|
||||
options = {
|
||||
programs.nixvim.colorschemes.gruvbox = {
|
||||
enable = mkEnableOption "Enable gruvbox";
|
||||
|
||||
italics = mkEnableOption "Enable italics";
|
||||
bold = mkEnableOption "Enable bold";
|
||||
underline = mkEnableOption "Enable underlined text";
|
||||
undercurl = mkEnableOption "Enable undercurled text";
|
||||
|
||||
contrastDark = mkOption {
|
||||
type = types.nullOr (types.enum [ "soft" "medium" "hard" ]);
|
||||
default = null;
|
||||
description = "Contrast for the dark mode";
|
||||
};
|
||||
|
||||
contrastLight = mkOption {
|
||||
type = types.nullOr (types.enum [ "soft" "medium" "hard" ]);
|
||||
default = null;
|
||||
description = "Contrast for the light mode";
|
||||
};
|
||||
|
||||
highlightSearchCursor = mkOption {
|
||||
type = types.nullOr colors;
|
||||
default = null;
|
||||
description = "The cursor background while search is highlighted";
|
||||
};
|
||||
|
||||
numberColumn = mkOption {
|
||||
type = types.nullOr colors;
|
||||
default = null;
|
||||
description = "The number column background";
|
||||
};
|
||||
|
||||
signColumn = mkOption {
|
||||
type = types.nullOr colors;
|
||||
default = null;
|
||||
description = "The sign column background";
|
||||
};
|
||||
|
||||
colorColumn = mkOption {
|
||||
type = types.nullOr colors;
|
||||
default = null;
|
||||
description = "The color column background";
|
||||
};
|
||||
|
||||
vertSplitColor = mkOption {
|
||||
type = types.nullOr colors;
|
||||
default = null;
|
||||
description = "The vertical split background color";
|
||||
};
|
||||
|
||||
italicizeComments = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Italicize comments";
|
||||
};
|
||||
|
||||
italicizeStrings = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Italicize strings";
|
||||
};
|
||||
|
||||
invertSelection = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Invert the select text";
|
||||
};
|
||||
|
||||
invertSigns = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Invert GitGutter and Syntastic signs";
|
||||
};
|
||||
|
||||
invertIndentGuides = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Invert indent guides";
|
||||
};
|
||||
|
||||
invertTabline = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Invert tabline highlights";
|
||||
};
|
||||
|
||||
improvedStrings = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Improved strings";
|
||||
};
|
||||
|
||||
improvedWarnings = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Improved warnings";
|
||||
};
|
||||
|
||||
transparentBg = mkEnableOption "Transparent background";
|
||||
|
||||
trueColor = mkEnableOption "Enable true color support";
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -13,6 +114,30 @@ in {
|
|||
programs.nixvim = {
|
||||
colorscheme = "gruvbox";
|
||||
extraPlugins = [ pkgs.vimPlugins.gruvbox ];
|
||||
|
||||
globals = {
|
||||
gruvbox_bold = mkIf (!cfg.bold) 0;
|
||||
gruvbox_italic = mkIf (cfg.italics) 1;
|
||||
gruvbox_underline = mkIf (cfg.underline) 1;
|
||||
gruvbox_undercurl = mkIf (cfg.undercurl) 1;
|
||||
gruvbox_transparent_bg = mkIf (cfg.transparentBg) 0;
|
||||
gruvbox_contrast_dark = mkIf (!isNull cfg.contrastDark) cfg.contrastDark;
|
||||
gruvbox_contrast_light = mkIf (!isNull cfg.contrastLight) cfg.contrastLight;
|
||||
gruvbox_hls_cursor = mkIf (!isNull cfg.highlightSearchCursor) cfg.highlightSearchCursor;
|
||||
gruvbox_number_column = mkIf (!isNull cfg.numberColumn) cfg.numberColumn;
|
||||
gruvbox_sign_column = mkIf (!isNull cfg.signColumn) cfg.signColumn;
|
||||
gruvbox_color_column = mkIf (!isNull cfg.colorColumn) cfg.colorColumn;
|
||||
gruvbox_vert_split = mkIf (!isNull cfg.vertSplitColor) cfg.vertSplitColor;
|
||||
|
||||
gruvbox_italicize_comments = mkIf (!cfg.italicizeComments) 0;
|
||||
gruvbox_italicize_strings = mkIf (cfg.italicizeStrings) 1;
|
||||
gruvbox_invert_selection = mkIf (!cfg.invertSelection) 0;
|
||||
gruvbox_invert_signs = mkIf (cfg.invertSigns) 1;
|
||||
gruvbox_invert_indent_guides = mkIf (cfg.invertIndentGuides) 1;
|
||||
gruvbox_invert_tabline = mkIf (cfg.invertTabline) 1;
|
||||
gruvbox_improved_strings = mkIf (cfg.improvedStrings) 1;
|
||||
gruvbox_improved_warnings = mkIf (cfg.improvedWarnings) 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue