Wip config binary compilation

This commit is contained in:
2024-12-27 12:42:28 +01:00
parent 8cc2ad98c1
commit b5a802f8f0
+13 -3
View File
@@ -1,6 +1,7 @@
{
pkgs,
lib,
stdenv,
...
}: {
package ? pkgs.neovim,
@@ -23,6 +24,15 @@
nvim = builder.byteCompileVim package;
# TODO: only the (unused) init.lua seems to be byte compiled, idk why
conf = builder.byteCompileLuaDrv (
(pkgs.runCommandLocal "nvim-config" {} ''
mkdir $out
cp -r ${config}/* $out
ls $out
'')
);
pluginPack = let
normalize = optional: p: let
defaultPlugin = {
@@ -66,12 +76,12 @@
initLua =
# lua
''
-- TODO: binary compile the config
print("${conf}")
vim.opt.rtp = {
"${config}",
"${conf}",
"${pluginPack}/pack/packages/start/vimplugin-plugin-pack",
vim.env.VIMRUNTIME,
"${config}/after",
"${conf}/after",
}
vim.opt.packpath = {
"${pluginPack}",