From 3e48cea5361b0854c6a5036be7313e8214350194 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang <59727193+horriblename@users.noreply.github.com> Date: Mon, 30 Sep 2024 21:57:03 +0200 Subject: [PATCH] lzn-auto-require: add init lua code --- modules/wrapper/rc/config.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/wrapper/rc/config.nix b/modules/wrapper/rc/config.nix index 6f9ed1c..25fc9bc 100644 --- a/modules/wrapper/rc/config.nix +++ b/modules/wrapper/rc/config.nix @@ -4,8 +4,8 @@ ... }: let inherit (builtins) map mapAttrs filter; - inherit (lib.attrsets) mapAttrsToList filterAttrs; - inherit (lib.strings) concatLines concatMapStringsSep; + inherit (lib.attrsets) mapAttrsToList; + inherit (lib.strings) concatLines concatMapStringsSep optionalString; inherit (lib.trivial) showWarnings; inherit (lib.generators) mkLuaInline; inherit (lib.nvim.dag) entryAfter mkLuarcSection resolveDag entryAnywhere; @@ -55,6 +55,8 @@ in { pluginConfigs = entryAfter ["optionsScript"] pluginConfigs; extraPluginConfigs = entryAfter ["pluginConfigs"] extraPluginConfigs; mappings = entryAfter ["extraPluginConfigs"] keymaps; + # FIXME: put this somewhere less stupid + footer = entryAfter ["mappings"] (optionalString config.vim.lazy.enable "require('lzn-auto-require').enable()"); }; builtLuaConfigRC = let