mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 17:28:39 +02:00
colorschemes/one: switch to mkVimPlugin
This commit is contained in:
parent
b8b0c1d58f
commit
a1d97bf199
2 changed files with 32 additions and 14 deletions
|
@ -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;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
15
tests/test-sources/plugins/colorschemes/one.nix
Normal file
15
tests/test-sources/plugins/colorschemes/one.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
colorschemes.one.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
colorschemes.one = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
allow_italics = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue