nvim-neorocks / rocks-dev.nvim

A swiss-army knife for testing and developing rocks.nvim modules.
GNU General Public License v3.0
14 stars 4 forks source link

rocks-confing configurations not loaded #8

Closed mrcjkb closed 1 month ago

mrcjkb commented 6 months ago

Problem

rocks-config, when loaded using rocks-dev, cannot load any plugins, because it is added to the rtp too late.

Solution

Use a packpath, and symlink the dev paths during initialisation (and during sync).

vim.fs.joinpath(vim.fn.stdpath("data"), "site", "pack", "rocks-dev"),

Bonus: This would also allow rocks-dev to support the opt flag, by putting symlinks in the start or opt directory.

sahinf commented 3 months ago

Hey any updates on a PR to fix #15?

mrcjkb commented 3 months ago

Hey any updates on a PR to fix #15?

This is still on my radar, but it isn't on the top of my stack of things to do right now 😞

But PRs are more than welcome 😃 Related: https://github.com/nvim-neorocks/rocks.nvim/pull/285

sahinf commented 3 months ago

I'm still having the same issue though.

rocks.toml

[plugins]
# neorg = "8.7.1"
"rocks-dev.nvim" = "1.2.3"

[plugins.'neorg']
dir = "~/projects/neorg"

init.lua

vim.cmd.packadd { 'rocks-dev.nvim', bang = true }

run :Rocks sync, then run new nvim

Warning [neorg]: lua-utils not found. If you're just installing the plugin, ignore this message, when in doubt run `:Lazy build neorg`. If you're not on lazy please rerun the build scripts.

and I verified that Rocks didn't import the local copy through find ~/.local/share/ -type d -name '*neorg*' -prune.

I'm not sure how to debug this further. Any suggestions?

mrcjkb commented 3 months ago

I'm not sure how to debug this further. Any suggestions?

So your previous workaround (packadd without bang = true) no longer works?

Is lua-utils.nvim installed? rocks-dev doesn't install plugin dependencies. If it is, you could also try adding

vim.cmd.packadd { 'lua-utils.nvim', bang = true }
mrcjkb commented 1 month ago

Another idea: Now that rocks-config has a configure API, we could use that.

Edit: Although, this would not work with bundles :disappointed: