feat: new option to enable lua module loader

This commit is contained in:
Ching Pei Yang 2023-05-09 12:14:53 +02:00 committed by NotAShelf
parent 93405fad4c
commit f18bc8a676
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22
2 changed files with 5 additions and 0 deletions

View file

@ -144,5 +144,7 @@ with builtins; {
default = true; default = true;
description = "Follow editorconfig rules in current directory"; description = "Follow editorconfig rules in current directory";
}; };
enableLuaLoader = mkEnableOption "Enable the experimental Lua module loader to speed up the start up process";
}; };
} }

View file

@ -9,6 +9,9 @@ with builtins; let
wrapLuaConfig = luaConfig: '' wrapLuaConfig = luaConfig: ''
lua << EOF lua << EOF
${optionalString cfg.enableLuaLoader ''
vim.loader.enable()
''}
${luaConfig} ${luaConfig}
EOF EOF
''; '';