diffview.nvim
diffview.nvim copied to clipboard
feat: rocks.nvim/luarocks support
Summary
This PR is part of a push to get neovim plugins on LuaRocks.
- See this blog post, which follows up on a series of posts by @teto.
- See also: rocks.nvim, a new luarocks-based plugin manager.
Things done:
- Add a release-please workflow that creates release PRs with SemVer versioning based on conventional commits.
- Add a workflow that publishes tags to LuaRocks when a tag or release is pushed.
The workflows are based on this guide by @vhyrro.
Notes:
[!IMPORTANT]
- For the luarocks workflow to work, someone with a luarocks.org account will have to add their API key to this repo's GitHub actions secrets.
- On each merge to
main, therelease-pleaseworkflow creates (or updates an existing) release PR. - You decide when to merge release PRs.
Doing so will result in a SemVer tag, and a GitHub release, which will trigger the
luarocksworkflow. - Tagged releases are installed locally and then published to luarocks.org. On PRs, a test release is installed, but not published.
- Due to a shortcoming in LuaRocks (https://github.com/luarocks/luarocks-site/issues/188), the
neovimand/orvimlabels have to be added to the LuaRocks package manually (after the first upload), for this plugin to show up in https://luarocks.org/labels/neovim or https://luarocks.org/labels/vim, respectively.
Adding the API key (screen shot)

Are there any plans to add this, aka Luarocks support?
We have an upstream plugin that uses diffview.nvim (it's fantastic by the way) and we'd like to be able to install it via LuaRocks to run tests in our CI/CD pipeline, if possible!
As there has been no response, I will add this plugin to the NURR, which means diffview.nvim will be published to luarocks.org under the neorocks organisation account.
@sindrets if you would like to merge this one day, please ping me, and I will remove the package from the luarocks root manifest.
@harrisoncramer because diffview.nvim doesn't have tagged releases, the NURR workflow will only publish an scm rockspec.
You could add it as a dependency to gitlab.nvim, but luarocks won't be able to resolve the dependency unless installing gitlab.nvim with a dev version (or using the --dev flag).
For this reason, I would suggest not publishing a non-scm rockspec to luarocks until all of gitlab.nvim's dependencies have semver releases on luarocks.org.