mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-25 02:08:40 +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,19 +4,38 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
with lib; let
|
imports =
|
||||||
cfg = config.colorschemes.gruvbox;
|
[
|
||||||
in {
|
(
|
||||||
meta.maintainers = [maintainers.GaetanLepage];
|
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
|
name = "gruvbox";
|
||||||
|
namespace = "colorschemes";
|
||||||
|
originalName = "gruvbox.nvim";
|
||||||
|
defaultPackage = pkgs.vimPlugins.gruvbox-nvim;
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
terminal_colors = true;
|
||||||
|
palette_overrides = {
|
||||||
|
dark1 = "#323232";
|
||||||
|
dark2 = "#383330";
|
||||||
|
dark3 = "#323232";
|
||||||
|
bright_blue = "#5476b2";
|
||||||
|
bright_purple = "#fb4934";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
maintainers = [lib.maintainers.GaetanLepage];
|
||||||
|
}
|
||||||
|
)
|
||||||
|
]
|
||||||
# Introduced January 31 2024
|
# Introduced January 31 2024
|
||||||
# TODO remove in early March 2024.
|
# TODO remove in early March 2024.
|
||||||
imports =
|
++ (
|
||||||
map
|
map
|
||||||
(
|
(
|
||||||
optionName:
|
optionName:
|
||||||
mkRemovedOptionModule
|
lib.mkRemovedOptionModule
|
||||||
["colorschemes" "gruvbox" optionName]
|
["colorschemes" "gruvbox" optionName]
|
||||||
"Please use `colorschemes.gruvbox.settings.${helpers.toSnakeCase optionName}` instead."
|
"Please use `colorschemes.gruvbox.settings.${helpers.toSnakeCase optionName}` instead."
|
||||||
)
|
)
|
||||||
|
@ -42,40 +61,6 @@ in {
|
||||||
"improvedWarnings"
|
"improvedWarnings"
|
||||||
"transparentBg"
|
"transparentBg"
|
||||||
"trueColor"
|
"trueColor"
|
||||||
];
|
]
|
||||||
|
);
|
||||||
options.colorschemes.gruvbox = {
|
|
||||||
enable = mkEnableOption "gruvbox.nvim";
|
|
||||||
|
|
||||||
package = helpers.mkPackageOption "gruvbox.nvim" pkgs.vimPlugins.gruvbox-nvim;
|
|
||||||
|
|
||||||
settings = mkOption {
|
|
||||||
type = with types;
|
|
||||||
submodule {
|
|
||||||
freeformType = attrs;
|
|
||||||
options = {};
|
|
||||||
};
|
|
||||||
description = "The configuration options for gruvbox.";
|
|
||||||
default = {};
|
|
||||||
example = {
|
|
||||||
terminal_colors = true;
|
|
||||||
palette_overrides = {
|
|
||||||
dark1 = "#323232";
|
|
||||||
dark2 = "#383330";
|
|
||||||
dark3 = "#323232";
|
|
||||||
bright_blue = "#5476b2";
|
|
||||||
bright_purple = "#fb4934";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
colorscheme = "gruvbox";
|
|
||||||
extraPlugins = [cfg.package];
|
|
||||||
|
|
||||||
extraConfigLua = ''
|
|
||||||
require('gruvbox').setup(${helpers.toLuaObject cfg.settings})
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue