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,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.colorschemes.one;
|
||||
in {
|
||||
options = {
|
||||
colorschemes.one = {
|
||||
enable = mkEnableOption "vim-one";
|
||||
helpers.vim-plugin.mkVimPlugin config {
|
||||
name = "one";
|
||||
isColorscheme = true;
|
||||
originalName = "vim-one";
|
||||
defaultPackage = pkgs.vimPlugins.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 {
|
||||
colorscheme = "one";
|
||||
extraPlugins = [cfg.package];
|
||||
|
||||
options = {
|
||||
termguicolors = true;
|
||||
settingsExample = {
|
||||
allow_italics = true;
|
||||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
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