From d348bb3e036cb151c152cccaaa2c02892af6b642 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 7 Apr 2024 11:30:24 +0200 Subject: [PATCH] lib/types: factor out logLevel enum for standalone use --- lib/options.nix | 8 +++----- lib/types.nix | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/options.nix b/lib/options.nix index 478ef445..c18434e3 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -193,11 +193,9 @@ with nixvimUtils; rec { type = with types; nullOr ( - either ints.unsigned - ( - enum - ["off" "error" "warn" "info" "debug" "trace"] - ) + either + ints.unsigned + nixvimTypes.logLevel ); default = null; apply = diff --git a/lib/types.nix b/lib/types.nix index b283766d..e5101264 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -38,6 +38,8 @@ in (listOf (listOf str)) ]; + logLevel = types.enum ["off" "error" "warn" "info" "debug" "trace"]; + highlight = types.submodule { # Adds flexibility for other keys freeformType = types.attrs;