From 01a45fd033417667b91b773188f55ca15072d407 Mon Sep 17 00:00:00 2001 From: Wolbyte <79154039+Wolbyte@users.noreply.github.com> Date: Mon, 26 Jun 2023 11:39:10 +0000 Subject: [PATCH] helpers.defaultNullOpts.mkBorder: Improve indentation & formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: GaƩtan Lepage <33058747+GaetanLepage@users.noreply.github.com> --- lib/helpers.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/helpers.nix b/lib/helpers.nix index a02b1f86..940885d5 100644 --- a/lib/helpers.nix +++ b/lib/helpers.nix @@ -144,10 +144,19 @@ with lib; rec { mkEnum = enum: default: mkNullable (lib.types.enum enum) ''"${default}"''; mkEnumFirstDefault = enum: mkEnum enum (head enum); mkBorder = default: name: desc: - mkNullable (with lib.types; oneOf [str (listOf str) (listOf (listOf str))]) default (let + mkNullable + ( + with lib.types; + oneOf [ + str + (listOf str) + (listOf (listOf str)) + ] + ) + default + (let defaultDesc = '' Defines the border to use for ${name}. - Accepts same border values as `nvim_open_win()`. See `:help nvim_open_win()` for more info. ''; in @@ -155,7 +164,6 @@ with lib; rec { then defaultDesc else '' ${desc} - ${defaultDesc} ''); };