From f88ff0a82e6d8e33c4c5b099e808191b6c4a96e2 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 1 Jan 2024 23:49:35 +0100 Subject: [PATCH] helpers: borderType -> nixvimTypes.border --- lib/helpers.nix | 16 ++++++++-------- plugins/utils/molten.nix | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/helpers.nix b/lib/helpers.nix index 9a85f4d7..6c40a77a 100644 --- a/lib/helpers.nix +++ b/lib/helpers.nix @@ -59,13 +59,6 @@ with lib; rec { emptyTable = {"__empty" = null;}; - borderType = with lib.types; - oneOf [ - str - (listOf str) - (listOf (listOf str)) - ]; - # Creates an option with a nullable type that defaults to null. mkNullOrOption = type: desc: lib.mkOption { @@ -178,7 +171,7 @@ with lib; rec { mkEnumFirstDefault = enum: mkEnum enum (head enum); mkBorder = default: name: desc: mkNullable - borderType + nixvimTypes.border default (let defaultDesc = '' @@ -381,6 +374,13 @@ with lib; rec { check = isRawType; }; + border = with types; + oneOf [ + str + (listOf str) + (listOf (listOf str)) + ]; + highlight = types.submodule { # Adds flexibility for other keys freeformType = types.attrs; diff --git a/plugins/utils/molten.nix b/plugins/utils/molten.nix index 98cb7b64..027a73ba 100644 --- a/plugins/utils/molten.nix +++ b/plugins/utils/molten.nix @@ -95,7 +95,7 @@ with import ../helpers.nix {inherit lib;}; Default: `["" "━" "" ""]` ''; - type = borderType; + type = nixvimTypes.border; }; outputWinCoverGutter = mkDefaultOpt {