diff --git a/lib/options.nix b/lib/options.nix index ba715b71..20fc4a8e 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -54,14 +54,16 @@ rec { ); mkNullOrLuaFn = description: mkNullOrLua' { inherit description; }; - mkNullOrStrLuaOr = - ty: desc: - lib.mkOption { - type = lib.types.nullOr (types.either nixvimTypes.strLua ty); - default = null; - description = desc; - apply = v: if builtins.isString v then mkRaw v else v; - }; + mkNullOrStrLuaOr' = + { type, ... }@args: + mkNullOrOption' ( + args + // { + type = with nixvimTypes; either strLua type; + apply = v: if isString v then mkRaw v else v; + } + ); + mkNullOrStrLuaOr = type: description: mkNullOrStrLuaOr' { inherit type description; }; mkNullOrStrLuaFnOr = ty: desc: