Closed danymat closed 5 months ago
Hey 👋
This would indeed likely be solved by the solution for #8.
The issue is that dev plugins are neither luarocks packages, nor are they on the packpath
.
I think your workaround is a pretty good solution, actually.
If you install rocks-dev change it to vim.cmd.packadd { 'rocks-dev.nvim', bang = true }
, it should add the plugin to the runtimepath without sourcing the plugin script (I'm not sure, but you might have to set opt = true
for rocks-dev.
As a result, the dev plugins' scripts would still be sourced after rocks-config.
I'll close this as a duplicate of #8.
Hello,
It seems to be quite related to #8 (because of plugin init order). The issue here arises when you install
rocks-config
androcks-dev
, and use a configuration inlua/plugins/<plugin>.lua
for a plugin that is installed byrocks-dev
.For example, install neogen locally with rocks-dev:
Create a configuration file in
lua/plugins/neogen.lua
and restart neovim. Running:checkhealth rocks-config
will say that neogen module was not found. But the neogen module is loaded (without it's configuration). Checking with:lua vim.print(require("neogen"))
works.My guess is that rocks-config, because of its preload script, will load before anything else, and check for modules installed with default rocks.toml behavior. It will find neogen in the toml, try to execute the confuguration file, but if you require the plugin, it will error out because the plugin will be loaded after, when rocks-dev will be loaded.
My guess would be to load rocks-dev plugins before, or check with rocks-config if rocks-dev is installed and has plugins installed. For a workaround fix, I used:
At the end of my
init.lua
file, that will load rocks-dev.nvim before anything (even before rocks-config). But i guess this is just a temporary solution