mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-25 10:18:36 +02:00
colorschemes/gruvbox: switch to mkNeovimPlugin
This commit is contained in:
parent
f3e2fbace2
commit
e7700cea5e
1 changed files with 55 additions and 70 deletions
|
@ -4,78 +4,63 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
with lib; let
|
|
||||||
cfg = config.colorschemes.gruvbox;
|
|
||||||
in {
|
|
||||||
meta.maintainers = [maintainers.GaetanLepage];
|
|
||||||
|
|
||||||
# Introduced January 31 2024
|
|
||||||
# TODO remove in early March 2024.
|
|
||||||
imports =
|
imports =
|
||||||
map
|
|
||||||
(
|
|
||||||
optionName:
|
|
||||||
mkRemovedOptionModule
|
|
||||||
["colorschemes" "gruvbox" optionName]
|
|
||||||
"Please use `colorschemes.gruvbox.settings.${helpers.toSnakeCase optionName}` instead."
|
|
||||||
)
|
|
||||||
[
|
[
|
||||||
"italics"
|
(
|
||||||
"bold"
|
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
"underline"
|
name = "gruvbox";
|
||||||
"undercurl"
|
namespace = "colorschemes";
|
||||||
"contrastDark"
|
originalName = "gruvbox.nvim";
|
||||||
"contrastLight"
|
defaultPackage = pkgs.vimPlugins.gruvbox-nvim;
|
||||||
"highlightSearchCursor"
|
|
||||||
"numberColumn"
|
|
||||||
"signColumn"
|
|
||||||
"colorColumn"
|
|
||||||
"vertSplitColor"
|
|
||||||
"italicizeComments"
|
|
||||||
"italicizeStrings"
|
|
||||||
"invertSelection"
|
|
||||||
"invertSigns"
|
|
||||||
"invertIndentGuides"
|
|
||||||
"invertTabline"
|
|
||||||
"improvedStrings"
|
|
||||||
"improvedWarnings"
|
|
||||||
"transparentBg"
|
|
||||||
"trueColor"
|
|
||||||
];
|
|
||||||
|
|
||||||
options.colorschemes.gruvbox = {
|
settingsExample = {
|
||||||
enable = mkEnableOption "gruvbox.nvim";
|
terminal_colors = true;
|
||||||
|
palette_overrides = {
|
||||||
|
dark1 = "#323232";
|
||||||
|
dark2 = "#383330";
|
||||||
|
dark3 = "#323232";
|
||||||
|
bright_blue = "#5476b2";
|
||||||
|
bright_purple = "#fb4934";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
package = helpers.mkPackageOption "gruvbox.nvim" pkgs.vimPlugins.gruvbox-nvim;
|
maintainers = [lib.maintainers.GaetanLepage];
|
||||||
|
}
|
||||||
settings = mkOption {
|
)
|
||||||
type = with types;
|
]
|
||||||
submodule {
|
# Introduced January 31 2024
|
||||||
freeformType = attrs;
|
# TODO remove in early March 2024.
|
||||||
options = {};
|
++ (
|
||||||
};
|
map
|
||||||
description = "The configuration options for gruvbox.";
|
(
|
||||||
default = {};
|
optionName:
|
||||||
example = {
|
lib.mkRemovedOptionModule
|
||||||
terminal_colors = true;
|
["colorschemes" "gruvbox" optionName]
|
||||||
palette_overrides = {
|
"Please use `colorschemes.gruvbox.settings.${helpers.toSnakeCase optionName}` instead."
|
||||||
dark1 = "#323232";
|
)
|
||||||
dark2 = "#383330";
|
[
|
||||||
dark3 = "#323232";
|
"italics"
|
||||||
bright_blue = "#5476b2";
|
"bold"
|
||||||
bright_purple = "#fb4934";
|
"underline"
|
||||||
};
|
"undercurl"
|
||||||
};
|
"contrastDark"
|
||||||
};
|
"contrastLight"
|
||||||
};
|
"highlightSearchCursor"
|
||||||
|
"numberColumn"
|
||||||
config = mkIf cfg.enable {
|
"signColumn"
|
||||||
colorscheme = "gruvbox";
|
"colorColumn"
|
||||||
extraPlugins = [cfg.package];
|
"vertSplitColor"
|
||||||
|
"italicizeComments"
|
||||||
extraConfigLua = ''
|
"italicizeStrings"
|
||||||
require('gruvbox').setup(${helpers.toLuaObject cfg.settings})
|
"invertSelection"
|
||||||
'';
|
"invertSigns"
|
||||||
};
|
"invertIndentGuides"
|
||||||
|
"invertTabline"
|
||||||
|
"improvedStrings"
|
||||||
|
"improvedWarnings"
|
||||||
|
"transparentBg"
|
||||||
|
"trueColor"
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue