mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
mini/hues: init
This commit is contained in:
parent
fca63ede6c
commit
755052cea9
7 changed files with 82 additions and 0 deletions
|
@ -18,5 +18,6 @@
|
|||
./fuzzy
|
||||
./git
|
||||
./hipatterns
|
||||
./hues
|
||||
];
|
||||
}
|
||||
|
|
19
modules/plugins/mini/hues/config.nix
Normal file
19
modules/plugins/mini/hues/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.hues;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-hues"];
|
||||
|
||||
pluginRC.mini-hues = entryAnywhere ''
|
||||
require("mini.hues").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/hues/default.nix
Normal file
6
modules/plugins/mini/hues/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./hues.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
33
modules/plugins/mini/hues/hues.nix
Normal file
33
modules/plugins/mini/hues/hues.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.strings) hasPrefix;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
inherit (lib.nvim.types) hexColor;
|
||||
in {
|
||||
options.vim.mini.hues = {
|
||||
enable = mkEnableOption "mini.hues";
|
||||
setupOpts = mkPluginSetupOption "mini.hues" {
|
||||
background = mkOption {
|
||||
description = "The background color to use";
|
||||
type = hexColor;
|
||||
apply = v:
|
||||
if hasPrefix "#" v
|
||||
then v
|
||||
else "#${v}";
|
||||
};
|
||||
|
||||
foreground = mkOption {
|
||||
description = "The foreground color to use";
|
||||
type = hexColor;
|
||||
apply = v:
|
||||
if hasPrefix "#" v
|
||||
then v
|
||||
else "#${v}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue