mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
modules/performance: add ability to byte compile extraLuaPackages
This commit adds `performance.byteCompileLua.luaLib` options. When enabled it byte-compiles lua packages from extraLuaPackages option.
This commit is contained in:
parent
fac192c022
commit
404e56066f
3 changed files with 64 additions and 9 deletions
|
@ -57,6 +57,9 @@ in
|
|||
nvimRuntime = lib.mkEnableOption "nvimRuntime" // {
|
||||
description = "Whether to byte compile lua files in Nvim runtime.";
|
||||
};
|
||||
luaLib = lib.mkEnableOption "luaLib" // {
|
||||
description = "Whether to byte compile lua library.";
|
||||
};
|
||||
};
|
||||
|
||||
combinePlugins = {
|
||||
|
|
|
@ -171,11 +171,18 @@ in
|
|||
|
||||
config =
|
||||
let
|
||||
# Optionally byte compile lua library
|
||||
extraLuaPackages =
|
||||
if config.performance.byteCompileLua.enable && config.performance.byteCompileLua.luaLib then
|
||||
ps: map builders.byteCompileLuaDrv (config.extraLuaPackages ps)
|
||||
else
|
||||
config.extraLuaPackages;
|
||||
|
||||
neovimConfig = pkgs.neovimUtils.makeNeovimConfig (
|
||||
{
|
||||
inherit extraLuaPackages;
|
||||
inherit (config)
|
||||
extraPython3Packages
|
||||
extraLuaPackages
|
||||
viAlias
|
||||
vimAlias
|
||||
withRuby
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue