From 5e3a0dcdc32259e50a78d763a6f5720b73b1de5e Mon Sep 17 00:00:00 2001 From: LilleAila Date: Sun, 19 Jan 2025 18:11:12 +0100 Subject: [PATCH] highlight: cterm as enum --- modules/neovim/init/highlight.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/modules/neovim/init/highlight.nix b/modules/neovim/init/highlight.nix index d00fe74a..8c110cac 100644 --- a/modules/neovim/init/highlight.nix +++ b/modules/neovim/init/highlight.nix @@ -4,7 +4,7 @@ ... }: let inherit (lib.options) mkOption literalExpression; - inherit (lib.types) nullOr attrsOf listOf submodule bool ints str; + inherit (lib.types) nullOr attrsOf listOf submodule bool ints str enum; inherit (lib.strings) hasPrefix concatStringsSep; inherit (lib.attrsets) mapAttrsToList; inherit (lib.nvim.dag) entryAnywhere; @@ -75,7 +75,22 @@ in { description = "The cterm background color to use"; }; cterm = mkOption { - type = nullOr (listOf str); + type = nullOr (listOf (enum [ + "bold" + "underline" + "undercurl" + "underdouble" + "underdotted" + "underdashed" + "strikethrough" + "reverse" + "inverse" + "italic" + "standout" + "altfont" + "nocombine" + "NONE" + ])); default = null; description = "The cterm arguments to use. See :h highlight-args"; };