feat: allow setting runtime.path

This commit is contained in:
punkfairie 2024-12-30 17:35:18 -08:00
parent 7d62e435c3
commit 24c7261517
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696

View file

@ -72,6 +72,7 @@
lua-version ? "5.1", lua-version ? "5.1",
disabled-diagnostics ? [], disabled-diagnostics ? [],
globals ? [], globals ? [],
runtimePath ? ["?.lua" "?/init.lua"],
}: let }: let
pluginPackages = pluginPackages =
map (x: x.plugin or x) map (x: x.plugin or x)
@ -88,7 +89,7 @@
pkg-sharedirs = builtins.map (pkg: "${pkg}/share/lua/${lua-version}") rocks; pkg-sharedirs = builtins.map (pkg: "${pkg}/share/lua/${lua-version}") rocks;
in { in {
runtime.version = "LuaJIT"; runtime.version = "LuaJIT";
runtime.path = ["?.lua" "?/init.lua"]; runtime.path = runtimePath;
globals = globals =
[ [
"vim" "vim"