colorschemes/one: switch to mkVimPlugin

This commit is contained in:
Gaetan Lepage 2024-03-27 10:52:44 +01:00 committed by Gaétan Lepage
parent b8b0c1d58f
commit a1d97bf199
2 changed files with 32 additions and 14 deletions

View file

@ -5,23 +5,26 @@
pkgs, pkgs,
... ...
}: }:
with lib; let helpers.vim-plugin.mkVimPlugin config {
cfg = config.colorschemes.one; name = "one";
in { isColorscheme = true;
options = { originalName = "vim-one";
colorschemes.one = { defaultPackage = pkgs.vimPlugins.vim-one;
enable = mkEnableOption "vim-one"; globalPrefix = "one_";
package = helpers.mkPackageOption "one" pkgs.vimPlugins.vim-one; maintainers = [lib.maintainers.GaetanLepage];
};
settingsOptions = {
allow_italics = helpers.defaultNullOpts.mkBool false ''
Whether to enable _italic_ (as long as your terminal supports it).
'';
}; };
config = mkIf cfg.enable { settingsExample = {
colorscheme = "one"; allow_italics = true;
extraPlugins = [cfg.package]; };
options = { extraConfig = cfg: {
termguicolors = true; options.termguicolors = lib.mkDefault true;
};
}; };
} }

View file

@ -0,0 +1,15 @@
{
empty = {
colorschemes.one.enable = true;
};
defaults = {
colorschemes.one = {
enable = true;
settings = {
allow_italics = false;
};
};
};
}