Luarocks supports patching via the rockspec, however, adding files that don't exist does not seem to work. This would require a custom build backend or an upstreaming of the feature (which has been implemented in the luarocks-build-treesitter-parser build backend),
A good POC could be the mini.nvim suite.
The idea (for mini.nvim plugins) would be to add a plugin script that
Checks if global Mini* variable exists (indicating the user has called setup already).
If not, call the mini module's setup().
Add checks to prevent the script from being sourced more than once.
Such patches could be tailored to other plugins that are unlikely to change their API.
Luarocks supports patching via the rockspec, however, adding files that don't exist does not seem to work. This would require a custom build backend or an upstreaming of the feature (which has been implemented in the luarocks-build-treesitter-parser build backend),
A good POC could be the mini.nvim suite. The idea (for mini.nvim plugins) would be to add a plugin script that
Mini*
variable exists (indicating the user has calledsetup
already).setup()
.Such patches could be tailored to other plugins that are unlikely to change their API.