1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 11:36:07 +01:00
nixvim/plugins/by-name/highlight-colors/default.nix
saygo-png c4b27080a6 treewide: infer packPathName menial work
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-09-27 23:49:59 +00:00

38 lines
990 B
Nix

{
lib,
config,
...
}:
lib.nixvim.plugins.mkNeovimPlugin {
name = "highlight-colors";
package = "nvim-highlight-colors";
moduleName = "nvim-highlight-colors";
description = "Highlight colors in Neovim buffers.";
maintainers = [ lib.maintainers.GaetanLepage ];
settingsExample = {
render = "virtual";
virtual_symbol = "";
enable_named_colors = true;
};
extraOptions = {
cmpIntegration = lib.mkEnableOption "cmp-integration for nvim-highlight-colors.";
};
extraConfig = cfg: {
opts.termguicolors = lib.mkDefault true;
plugins.cmp.settings.formatting.format = lib.mkIf cfg.cmpIntegration (
lib.nixvim.mkRaw "require('nvim-highlight-colors').format"
);
warnings = lib.nixvim.mkWarnings "plugins.highlight-colors" {
when = cfg.cmpIntegration && !config.plugins.cmp.enable;
message = ''
You have enabled the cmp integration with highlight-colors but `plugins.cmp` is not enabled.
'';
};
};
}