highlight: implement suggestions

This commit is contained in:
LilleAila 2025-01-19 19:36:32 +01:00
parent 5e3a0dcdc3
commit 653e5d6a17
No known key found for this signature in database
GPG key ID: D1ACCDCF2B9B9799
2 changed files with 9 additions and 9 deletions

View file

@ -102,7 +102,7 @@
- `mini.trailspace`
- `mini.visits`
- Add [fzf-lua](https://github.com/ibhagwan/fzf-lua) in `vim.fzf-lua`
- Add options to define highlights under `vim.highlight`
- Add options to define highlights under [](#opt-vim.highlight)
[kaktu5](https://github.com/kaktu5):

View file

@ -3,11 +3,11 @@
lib,
...
}: let
inherit (lib.options) mkOption literalExpression;
inherit (lib.options) mkOption;
inherit (lib.types) nullOr attrsOf listOf submodule bool ints str enum;
inherit (lib.strings) hasPrefix concatStringsSep;
inherit (lib.strings) hasPrefix concatLines;
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.dag) entryBetween;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.types) hexColor;
@ -15,18 +15,18 @@
mkOption {
type = nullOr hexColor;
default = null;
example = "#ebdbb2";
description = ''
The ${target} color to use. Written as color name or hex "#RRGGBB".
'';
example = "#ebdbb2";
};
mkBoolOption = name:
mkOption {
type = nullOr bool;
default = null;
description = ''Whether to enable ${name}'';
example = false;
description = "Whether to enable ${name}";
};
cfg = config.vim.highlight;
@ -98,14 +98,14 @@ in {
};
});
default = {};
description = "Custom highlight to apply";
example = literalExpression ''
example = ''
{
SignColumn = {
bg = "#282828";
};
}
'';
description = "Custom highlights to apply";
};
config = {
@ -116,6 +116,6 @@ in {
)
cfg;
in
entryAnywhere (concatStringsSep "\n" highlights);
entryBetween ["lazyConfigs" "pluginConfigs" "extraPluginConfigs"] ["theme"] (concatLines highlights);
};
}