mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/packer: improve lua generation (#270)
This commit is contained in:
parent
0ae6e18d55
commit
4eed4e1de4
1 changed files with 4 additions and 1 deletions
|
@ -220,11 +220,14 @@ in {
|
||||||
else plugins;
|
else plugins;
|
||||||
|
|
||||||
luaRockPlugins = luaRockListToLua cfg.rockPlugins;
|
luaRockPlugins = luaRockListToLua cfg.rockPlugins;
|
||||||
|
luaRocksString =
|
||||||
|
optionalString (cfg.rockPlugins != [])
|
||||||
|
"use_rocks ${helpers.toLuaObject luaRockPlugins}";
|
||||||
in
|
in
|
||||||
mkIf (cfg.plugins != []) ''
|
mkIf (cfg.plugins != []) ''
|
||||||
require('packer').startup(function()
|
require('packer').startup(function()
|
||||||
use ${helpers.toLuaObject packedPlugins}
|
use ${helpers.toLuaObject packedPlugins}
|
||||||
use_rocks ${helpers.toLuaObject luaRockPlugins}
|
${luaRocksString}
|
||||||
end)
|
end)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue