From 883d21d86602a71d158093a68d85fe0a36e269ab Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Sat, 25 May 2024 23:46:59 +0100 Subject: [PATCH] wrappers/output: omit blank `neovimRcContent` --- wrappers/modules/output.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wrappers/modules/output.nix b/wrappers/modules/output.nix index 614053e7..e81a64e1 100644 --- a/wrappers/modules/output.nix +++ b/wrappers/modules/output.nix @@ -114,11 +114,14 @@ with lib; ); customRC = - '' + let + hasContent = str: (builtins.match "[[:space:]]*" str) == null; + in + (optionalString (hasContent neovimConfig.neovimRcContent) '' vim.cmd([[ ${neovimConfig.neovimRcContent} ]]) - '' + '') + config.content; init = helpers.writeLua "init.lua" customRC;