From f18bc8a676976e6526d9a5ae66dc6a9eacd5bfed Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Tue, 9 May 2023 12:14:53 +0200 Subject: [PATCH] feat: new option to enable lua module loader --- modules/basic/module.nix | 2 ++ modules/core/default.nix | 3 +++ 2 files changed, 5 insertions(+) diff --git a/modules/basic/module.nix b/modules/basic/module.nix index 443abeeb..d06838e4 100644 --- a/modules/basic/module.nix +++ b/modules/basic/module.nix @@ -144,5 +144,7 @@ with builtins; { default = true; description = "Follow editorconfig rules in current directory"; }; + + enableLuaLoader = mkEnableOption "Enable the experimental Lua module loader to speed up the start up process"; }; } diff --git a/modules/core/default.nix b/modules/core/default.nix index 1c18abcb..91cccf54 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -9,6 +9,9 @@ with builtins; let wrapLuaConfig = luaConfig: '' lua << EOF + ${optionalString cfg.enableLuaLoader '' + vim.loader.enable() + ''} ${luaConfig} EOF '';