Skip to content
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

fix(config): only enable rocks if luarocks is installed #1540

Closed
wants to merge 1 commit into from

Conversation

mehalter
Copy link

This disables rocks packages by default if luarocks is not installed on the user's system

@mehalter
Copy link
Author

Background: luarocks can take a bit of forethought from the user mainly because they not only have to install luarocks but also make sure that they have installed lua v5.1 on their system as well as the development package with headers for it to work. This assumes that if the user has installed luarocks then they have put this forethought, if not the plugin manager works totally fine without it. Another potential thing that could be added is a check somehow to see if the user's system has lua v5.1 installed with the correct system headers or else they get hit with a bunch of errors that luarocks cannot find the appropriate header files. Especially since in all of the operating systems I have checked the default Lua version installed is typically newer and causes this error. For RHEL you have to install compat-lua, Arch you need to install lua51, etc.

@folke
Copy link
Owner

folke commented Jun 24, 2024

I'm not sure this is a good idea.
When users would add neorg for example, it would simply be broken and users would submit issues in the lazy.nvim or neorg repo.

As long as the user doesn't add a plugin that has a rockspec, this isn't really an issue?

Or do you have examples of plugins that cause issues right now?

A plugin with a rockspec will only use the rockspec if it has deps or if it has an advanced build process.

If there's any high profile plugins out there that have one of these things, but dont actually need a rockspec, then that plugin should add a lazy.lua file.

@mehalter
Copy link
Author

Yeah plenary is a great example as is telescope

@mehalter
Copy link
Author

I suppose time will tell if others run into this! Definitely understand the pause on disabling luarocks out of the box if it's not installed. I'll go ahead and close this for now and will follow the issues to see if anything comes up as people start adopting the new version.

Super super happy with this new addition! Thanks so much for this!

@mehalter mehalter closed this Jun 24, 2024
folke added a commit that referenced this pull request Jun 24, 2024
@folke
Copy link
Owner

folke commented Jun 24, 2024

I've just added special support for plenary.nvim.
plenary itself and a plugin that only has plenary as a dep will now install normally

@folke
Copy link
Owner

folke commented Jun 24, 2024

So this also skips luarocks for telescope.nvim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants