mirror of
https://github.com/zoriya/flake.git
synced 2026-05-24 23:45:55 +00:00
Wip config binary compilation
This commit is contained in:
+13
-3
@@ -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}",
|
||||
|
||||
Reference in New Issue
Block a user