mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2025-01-27 17:29:49 +01:00
mini/hues: init
This commit is contained in:
parent
fca63ede6c
commit
755052cea9
7 changed files with 82 additions and 0 deletions
|
@ -72,6 +72,7 @@
|
|||
- `mini.fuzzy`
|
||||
- `mini.git`
|
||||
- `mini.hipatterns`
|
||||
- `mini.hues`
|
||||
|
||||
[kaktu5](https://github.com/kaktu5):
|
||||
|
||||
|
|
17
flake.lock
17
flake.lock
|
@ -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",
|
||||
|
|
|
@ -835,5 +835,10 @@
|
|||
url = "github:echasnovski/mini.hipatterns";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
plugin-mini-hues = {
|
||||
url = "github:echasnovski/mini.hues";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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…
Reference in a new issue