You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey @kevinm6 do you know how we could avoid this? i think we don't have to force users to have a global lua 5.1 install (that fixes it) since it will be loaded by luajit anyway right?
Hi @3rd .. unfortunately for now it's required from Lazy the Lua@5.1 !
A workaround is the one reported in the Lazy UI warnings (or checkhealth), in Lazy config set this
What I think I'm missing is why is having a specific Lua version installed externally required when the end goal is pulling luarocks that will be executed with the LuaJIT bundled by Neovim anyway - I don't think I understand how it works. Is it for a build step on some of the rocks? Or is the external Lua installation used at runtime?
I think is due to some internals of Lazy that are really integrated with Neovim, since that's the one that needs Lua@5.1 and the way it loads the modules at runtime.
I don't think depends on something relative to LuaJIT or the rock build itself, since I'm capable of build it without Lua5.1 and in multiple ways outside NeoVim
Hey guys @kevinm6 i'm stucked in the same point, so should i install globally lua 5.1 and also the the hererocks key on true, like this?
rocks= {
hererocks=true,
},
Sorry, maybe I wasn't clear.. the option rocks.hererocks = true is Lazy's one (it installs another plugin that is a python script and manage the rocks and lua versions installs).
If you enable it, it works without having to install manually Lua5.1 and make it available on $PATH.
There are other ways you can fix it, as reported from @3rd, like just install and make lua5.1 available on $PATH or if you stick with luarocks.nvim, just do it as before.
@kevinm6 no no, your contribution is great, so Lazy requires Lua 5.1 installed correct?
Then we can re-enable the rockspec and document that requirement as well, would that be the best?
@kevinm6 no no, your contribution is great, so Lazy requires Lua 5.1 installed correct?
Yes, Lazy requires lua5.1 for the luarocks, due to its integration.
Then we can re-enable the rockspec and document that requirement as well, would that be the best?
I think should be fine if it's okay for you!
We could try to make it really clear in the README and probably is the better choice to use so far, since is reported from Lazy's developer
Thanks for everyone's help in this thread. Since I didn't have any other rocks installed in my config, I found that adding the hererocks rock to my lazy config wasn't enough. I needed to specify the magick dependency to initiate hererocks getting added as a plugin and the magick plugin bindings getting built. Sharing my setup (with a utility function I use to disable on Windows) in case anyone else runs into this and might find it helpful:
return {
{
'3rd/image.nvim',
-- Utility function to disable on Windows systemenabled=function()
ifvim.fn.has'win32' ==1thenreturnfalseelsereturntrueendend,
dependencies= {
'leafo/magick',
},
opts= {
-- ... image.nvim config
},
},
}
Thank you for great plugin! I recently developed plugin utilizing image.nvim.
image.nvim saved a lot of work for correctly handling scrolling/redrawing tasks!
I did some research about luarocks and lazy.nvim, and considering if we can re-enable rockspec support for lazy.nvim (which was introduced in #185).
I tested locally and the rockspec seems working without error when I set opts.rocks.hererocks (as already mentioned in #191 (comment)).
(NOTE: Even if opts.rocks.hererocks is not set and global Lua 5.4 (not Lua 5.1), image.nvim and magick build seems working, but :checkhealth of lazy.nvim complains. So I think it is not recommended configuration).
I wrote PR in my fork which should resolve this issue. sankantsu#1
If you would like, I will happily send PR to your repo.
Thank you!
Activity
onurcanbektas commentedon Jul 7, 2024
Same here
3rd commentedon Jul 7, 2024
hey @kevinm6 do you know how we could avoid this? i think we don't have to force users to have a global lua 5.1 install (that fixes it) since it will be loaded by luajit anyway right?
[-]Error wont go away[/-][+]Error wont go away (lazy.nvim luarocks)[/+]3rd commentedon Jul 7, 2024
Pinned this and disabled rockspec until we find a workaround @abdulrahmanDev1 @kevinm6
There is a discussion about this on Reddit, I'm not that familiar with rocks, hopefully we can find the right way to do things soon: https://www.reddit.com/r/neovim/comments/1dng1d6/comment/lc2t5uh/
kevinm6 commentedon Jul 7, 2024
Hi @3rd .. unfortunately for now it's required from Lazy the Lua@5.1 !
A workaround is the one reported in the Lazy UI warnings (or checkhealth), in Lazy config set this
Another pointer where it was discussed
3rd commentedon Jul 7, 2024
What I think I'm missing is why is having a specific Lua version installed externally required when the end goal is pulling luarocks that will be executed with the LuaJIT bundled by Neovim anyway - I don't think I understand how it works. Is it for a build step on some of the rocks? Or is the external Lua installation used at runtime?
kevinm6 commentedon Jul 7, 2024
I think is due to some internals of Lazy that are really integrated with Neovim, since that's the one that needs Lua@5.1 and the way it loads the modules at runtime.
I don't think depends on something relative to LuaJIT or the rock build itself, since I'm capable of build it without Lua5.1 and in multiple ways outside NeoVim
sebalfaro commentedon Jul 8, 2024
Hey guys @kevinm6 i'm stucked in the same point, so should i install globally lua 5.1 and also the the hererocks key on true, like this?
3rd commentedon Jul 8, 2024
I think if you install 5.1 globally it should just work, luarocks.nvim says it needs a global LuaJIT/Lua 5.1 installation.
sebalfaro commentedon Jul 8, 2024
Thank you @3rd
kapral18 commentedon Jul 8, 2024
@3rd luajit is installed with neovim when using
brewbecause it's a core dependency. I have it now and I see the error about missing magick rock.kevinm6 commentedon Jul 8, 2024
Sorry, maybe I wasn't clear.. the option
rocks.hererocks = trueis Lazy's one (it installs another plugin that is a python script and manage the rocks and lua versions installs).If you enable it, it works without having to install manually Lua5.1 and make it available on
$PATH.There are other ways you can fix it, as reported from @3rd, like just install and make lua5.1 available on $PATH or if you stick with
luarocks.nvim, just do it as before.1 remaining item
sebalfaro commentedon Jul 8, 2024
@kevinm6 @3rd working on my end without erros, i've added the
hererocksline that @kevinm6 has suggested. Thank you both guysd7omdev commentedon Jul 8, 2024
Thank you guys it's fixed for me too after I added the hererocks line I tried to do it before but it didn't work out for me,
Thank you all.
kevinm6 commentedon Jul 8, 2024
@sebalfaro @abdulrahmanDev1
Glad it helped. The amazing job is @3rd 's one, it seems now, my little contribution created more issues than benefits!
3rd commentedon Jul 8, 2024
@kevinm6 no no, your contribution is great, so Lazy requires Lua 5.1 installed correct?
Then we can re-enable the rockspec and document that requirement as well, would that be the best?
sebalfaro commentedon Jul 8, 2024
@3rd at least in my case it wasn't necessary to install neither Lua 5.1 nor magick locally, just adding the
hererocksline in thelazy.luafilekevinm6 commentedon Jul 8, 2024
Yes, Lazy requires lua5.1 for the luarocks, due to its integration.
I think should be fine if it's okay for you!
We could try to make it really clear in the README and probably is the better choice to use so far, since is reported from Lazy's developer
joncrangle commentedon Jul 11, 2024
Thanks for everyone's help in this thread. Since I didn't have any other rocks installed in my config, I found that adding the
hererocksrock to mylazyconfig wasn't enough. I needed to specify the magick dependency to initiatehererocksgetting added as a plugin and themagickplugin bindings getting built. Sharing my setup (with a utility function I use to disable on Windows) in case anyone else runs into this and might find it helpful:kevinm6 commentedon Jul 11, 2024
@joncrangle I think you can improve it and use Lazy
condto do not load a plugin if the condition isn't satisfied.NeelMishra commentedon Aug 28, 2024
Any updates on this issue?
3rd commentedon Aug 28, 2024
What issue are you encountering?
You can opt out of lazy + rocks and install the magick rock manually.
sankantsu commentedon Nov 1, 2024
Thank you for great plugin! I recently developed plugin utilizing image.nvim.
image.nvim saved a lot of work for correctly handling scrolling/redrawing tasks!
I did some research about luarocks and lazy.nvim, and considering if we can re-enable rockspec support for lazy.nvim (which was introduced in #185).
I tested locally and the rockspec seems working without error when I set
opts.rocks.hererocks(as already mentioned in #191 (comment)).(NOTE: Even if
opts.rocks.hererocksis not set and global Lua 5.4 (not Lua 5.1), image.nvim and magick build seems working, but:checkhealthof lazy.nvim complains. So I think it is not recommended configuration).I wrote PR in my fork which should resolve this issue.
sankantsu#1
If you would like, I will happily send PR to your repo.
Thank you!
3rd commentedon Nov 1, 2024
Hey, thanks awesome! Please open the PR <3