-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add hint how to correctly setup luarocks for luajit in neovim xor fetch artifacts in lazy #21
Comments
Hi, This problem is due to the fact that lazy.nvim uses Lua5.1 for luarocks integration since it is the version that Neovim uses. I think installing the I'm not too sure about the error below about the absence of luarocks. Is it installed on your system? If not, you could try the hererocks hint from the error message in your lazy.nvim configuration. |
Hmm I didn't realize adding the rockspec stuff would interfere with normal package installation... It looks like from folke/lazy.nvim#1576 you should set |
In theory it shouldn't, but the implementation of luarocks in Let's wait for @matu3ba's response to find out how he solved the problem and add some installation notes to the readme in case someone else runs into this issue. |
fails with
However, it at least suggests one working for me solution of
Proper usage of luarocks with multiple lua and luajit versions. After some investigation, it looks like nobody bothered to write docs on luarocks repo. It depends on the distro, if they support multipe versions, otherwise one has to use luarocks installations for the specific lua(jit) version. https://stackoverflow.com/questions/30362466/with-multiple-versions-of-lua-installed-is-it-possible-to-specify-which-one-luar Only switching between lua(jit) versions can be done via https://github.com/DhavalKapil/luaver, which boils down to something like http://lua-users.org/wiki/LuaRocksConfig or https://www.reddit.com/r/lua/comments/18yci9m/luarocks_how_do_i_change_the_installation/. Luarocks itself can be configured via https://github.com/luarocks/luarocks/wiki/config and queried via
and content of config-5.1.lua is
From what I understand nlua invokage is properly managed by https://github.com/mfussenegger/nlua, but I need to read through the lazy code to understand how luarocks can be invoked to not use the system default and instead neovim luajit. Not having luajit getting picked up by lazy to be used in luarocks feels like a bad default though. |
Hmm. So does my plugin need to do anything different here? Or is this an issue in lazy.nvim? |
The issue is in lazy.nvim, which provides no sane defaults for luarocks. The main point of this issues is to guide others running into the same problem. Otherwise, feel free to close. |
Added a note to the readme! Thanks and sorry for the trouble |
For me, my system doesn't come with a Luarocks installation, but I somehow had a Luarocks with Lua 5.2 installed. The version seemed to cause conflicts. The solution was to remove it, and lazy.nvim installed hererocks which solved the build issue. |
Signed-off-by: SUGIYAMA Yoshio <nenegi.01mo@gmail.com> natecraddock/telescope-zf-native.nvim#21 (comment)
I have system-setup with lua 5.4 (default).
The error
:Lazy sync
showsSee also lazy error folke/lazy.nvim#1575
If I change my usage of lazy to
require('lazy').setup('my_plugins', { pkg = { sources = "" } })
, then I getThe problem was introduced with d746bfa.
After experimentation I found out this worked:
However is that intended how it should be solved?
The text was updated successfully, but these errors were encountered: