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

feature: Enhance LuaRocks Spec Handling in lazy.nvim to Support Parameters #1886

Open
1 task done
imkerberos opened this issue Jan 13, 2025 · 0 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@imkerberos
Copy link

Did you check the docs?

  • I have read all the lazy.nvim docs

Is your feature request related to a problem? Please describe.

I'm developing a neovim plugin that requires a C component built using LuaRocks. The build process depends on environment variables to locate third-party libraries. Standard LuaRocks allows passing parameters or setting environment variables during the build using the spec file. However, lazy.nvim's current integration with LuaRocks doesn't provide a way to pass these necessary parameters. This limitation prevents the correct compilation of plugins with external C dependencies.

This feature request proposes adding support for passing parameters (e.g., environment variables, build flags) to the LuaRocks spec when building plugins with lazy.nvim. This would bring its LuaRocks integration closer to standard LuaRocks functionality and enable building more complex plugins.

Describe the solution you'd like

This feature request proposes adding an extra_arguments table to the build configuration. This table would contain arguments that are passed directly to the luarocks install command. This would allow users to customize the build process as needed.

return {
  "xxxxx/my-plugin",
  build = { "rockspec", extra_arguments = { "LIBFOO=/opt/foo", "DEBUG=1" }}, -- Multiple arguments
}

This should result in lazy.nvim executing:

luarocks install <internal-arguments> my-plugin LIBFOO=/opt/foo DEBUG=1

This feature would significantly enhance the flexibility of building plugins with external dependencies using LuaRocks within lazy.nvim.

Describe alternatives you've considered

None

Additional context

No response

@imkerberos imkerberos added the enhancement New feature or request label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant