From d66d4b80e06c9cef0a03ca4b77e3b47dc653b761 Mon Sep 17 00:00:00 2001 From: LeMarsu Date: Tue, 28 May 2024 20:06:29 +0200 Subject: [PATCH] fix: give default init.lua if none provided --- lib/mkNeovimPkg.nix | 2 +- lua/sloth-flake/init.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mkNeovimPkg.nix b/lib/mkNeovimPkg.nix index b895248..f6d13ff 100644 --- a/lib/mkNeovimPkg.nix +++ b/lib/mkNeovimPkg.nix @@ -27,7 +27,7 @@ extractPlugin = map (p: p.plugin); customRC = let - rc = ({init ? "", ...}: init) runtime; + rc = ({init ? ../lua/default_init.lua, ...}: init) runtime; in deps.textOrContent rc; diff --git a/lua/sloth-flake/init.lua b/lua/sloth-flake/init.lua index 0d65d13..cc1961e 100644 --- a/lua/sloth-flake/init.lua +++ b/lua/sloth-flake/init.lua @@ -69,7 +69,7 @@ function M.is_loaded(name) end function M.setup(config) - local post_init = config.post_init or function() end + local post_init = config and config.post_init or function() end M.init_all() post_init()