Closed vhyrro closed 7 months ago
It looks like it's indeed possible (with a simple workaround script to transform the arguments in the format expected by lua
to the format expected by nvim -l
)
@TheLeoP yeah, it seems like we can easily get 50% of the way there with nlua. I've tried this before though and it's not all sunshine and rainbows.
It seems that the configure
script doesn't like us passing nlua as the lua binary. Additionally, luarocks needs API headers for Lua itself, something that nlua nor Neovim expose :(
It is likely still possible with some workarounds, but getting it all to work isn't the easiest in the world :smile:
All I can think of is vendoring our own lua.h headers (doesn't sound all that great, but might fix the issue).
Or, we compile luarocks with whatever lua version luarocks can find, and then after the compilation step we alter the configuration to use nlua.
I think the latter is the best approach, and should make the compilation process suceed the most.
This doesn't seem to be possible, not with how things work in luarocks currently. I added the ability to compile with LuaJIT as a target in the meantime! Should make adoption much smoother for MacOS users :)
Instead of looking for a global Lua installation on the user's system, perhaps it would be possible to use Neovim builtin Lua interpreter as the driver for Luarocks itself.
Not even sure if this is possible, but it doesn't sound that difficult either. Perhaps with some trickery it could be done.