mini/hues: init

This commit is contained in:
LilleAila 2025-01-17 20:32:10 +01:00
parent fca63ede6c
commit 755052cea9
No known key found for this signature in database
GPG key ID: D1ACCDCF2B9B9799
7 changed files with 82 additions and 0 deletions

View file

@ -72,6 +72,7 @@
- `mini.fuzzy`
- `mini.git`
- `mini.hipatterns`
- `mini.hues`
[kaktu5](https://github.com/kaktu5):

View file

@ -1224,6 +1224,22 @@
"type": "github"
}
},
"plugin-mini-hues": {
"flake": false,
"locked": {
"lastModified": 1734960100,
"narHash": "sha256-4y79ejOkRL/fajZ4jC8t4K6EgNbnTsH++mIjmo6G3q0=",
"owner": "echasnovski",
"repo": "mini.hues",
"rev": "ae6ad4c666ff42c1102344fe1eba18bb486f2e46",
"type": "github"
},
"original": {
"owner": "echasnovski",
"repo": "mini.hues",
"type": "github"
}
},
"plugin-minimap-vim": {
"flake": false,
"locked": {
@ -2438,6 +2454,7 @@
"plugin-mini-fuzzy": "plugin-mini-fuzzy",
"plugin-mini-git": "plugin-mini-git",
"plugin-mini-hipatterns": "plugin-mini-hipatterns",
"plugin-mini-hues": "plugin-mini-hues",
"plugin-minimap-vim": "plugin-minimap-vim",
"plugin-modes-nvim": "plugin-modes-nvim",
"plugin-neo-tree-nvim": "plugin-neo-tree-nvim",

View file

@ -835,5 +835,10 @@
url = "github:echasnovski/mini.hipatterns";
flake = false;
};
plugin-mini-hues = {
url = "github:echasnovski/mini.hues";
flake = false;
};
};
}

View file

@ -18,5 +18,6 @@
./fuzzy
./git
./hipatterns
./hues
];
}

View 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})
'';
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./hues.nix
./config.nix
];
}

View 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}";
};
};
};
}