mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 17:28:39 +02:00
helpers.defaultNullOpts.mkBorder: Improve indentation & formatting
Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
This commit is contained in:
parent
600cd12057
commit
01a45fd033
1 changed files with 11 additions and 3 deletions
|
@ -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}
|
||||
'');
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue