mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-18 17:54:36 +02:00
colorschemes/ayu: switch to mkNeovimPlugin
This commit is contained in:
parent
efdd9f2688
commit
9ec2de03af
1 changed files with 35 additions and 39 deletions
|
@ -5,17 +5,23 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib;
|
||||||
cfg = config.colorschemes.ayu;
|
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
in {
|
name = "ayu";
|
||||||
options = {
|
namespace = "colorschemes";
|
||||||
colorschemes.ayu =
|
originalName = "neovim-ayu";
|
||||||
helpers.neovim-plugin.extraOptionsOptions
|
defaultPackage = pkgs.vimPlugins.neovim-ayu;
|
||||||
// {
|
callSetup = false;
|
||||||
enable = mkEnableOption "ayu";
|
|
||||||
|
|
||||||
package = helpers.mkPackageOption "ayu" pkgs.vimPlugins.neovim-ayu;
|
maintainers = [maintainers.GaetanLepage];
|
||||||
|
|
||||||
|
deprecateExtraConfig = true;
|
||||||
|
optionsRenamedToSettings = [
|
||||||
|
"mirage"
|
||||||
|
"overrides"
|
||||||
|
];
|
||||||
|
|
||||||
|
settingsOptions = {
|
||||||
mirage = helpers.defaultNullOpts.mkBool false ''
|
mirage = helpers.defaultNullOpts.mkBool false ''
|
||||||
Set to `true` to use `mirage` variant instead of `dark` for dark background.
|
Set to `true` to use `mirage` variant instead of `dark` for dark background.
|
||||||
'';
|
'';
|
||||||
|
@ -34,22 +40,12 @@ in {
|
||||||
`background`.
|
`background`.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
config = let
|
|
||||||
setupOptions = with cfg;
|
|
||||||
{
|
|
||||||
inherit overrides;
|
|
||||||
}
|
|
||||||
// cfg.extraOptions;
|
|
||||||
in
|
|
||||||
mkIf cfg.enable {
|
|
||||||
extraPlugins = [cfg.package];
|
|
||||||
|
|
||||||
|
extraConfig = cfg: {
|
||||||
extraConfigLuaPre = ''
|
extraConfigLuaPre = ''
|
||||||
local ayu = require("ayu")
|
local ayu = require("ayu")
|
||||||
ayu.setup(${helpers.toLuaObject setupOptions})
|
ayu.setup(${helpers.toLuaObject cfg.settings})
|
||||||
ayu.colorscheme()
|
ayu.colorscheme()
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue