-
Notifications
You must be signed in to change notification settings - Fork 2
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
Prune command doesn't seem to work for rocks-git.nvim packages #34
Prune command doesn't seem to work for rocks-git.nvim packages #34
Comments
Hey 👋 Thanks for the detailed report 🙏 |
This is the intended interface. The tab completions should show you which packages can be pruned. |
I was rather pointing that there is a workaround for now to get pruning of rocks-git packages to work (without just manually removing the repo directory from the nvim data path). Though this works (prune just the repo name which removes it from the config and then sync), I think that you should be able to prune the entire rocks-git package in one command. |
That's what nvim-neorocks/rocks.nvim#400 will fix 😄 What I was referring to by "this is the intended interface" is the fact that you have to pass in the rock name to prune, not the git URL. |
@mrcjkb Are you sure this is fixed? Just updated rocks.nvim version to 2.32.0 and when I run the |
Yep. But I've just realised the command completions don't work for rocks that are managed by external modules (like rocks-git and rocks-dev). |
Few notes:
|
This is what the rocks-git readme says:
rocks-git doesn't remove plugins from the rtp after pruning. It just deletes the repo from the file path so that it doesn't get added to the runtimepath on the next start. |
But the next part you left out is the part I'm referring to which states that the 'plugin' argument is the repo short name, ie. "owner/repo" EDIT: Oh I see, so the readme is saying that only the 'install' command is changed, not all of them. My bad on the misunderstanding. Could you also comment on the prune needing to be run twice? |
I did:
If it needs to be run twice in order to delete the repo, then something must be wrong. Do you have the same behaviour with |
My bad for not wording it properly. I meant the file path where the plugin was downloaded and then added to the runtime (ie. /site/pack/rocks/**/*)
Sync works immediately, I've only seen it on prune. I'll keep testing a few things just to make sure it's not on my end but so far, it always take two prunes for rocks-git packages when I load up nvim. |
That's very strange. |
Versions:
I can successfully run the "update", "edit", "sync", and "install" commands for git packages but running the "prune" command (
:Rocks prune tummetott/unimpaired.nvim
) yields this error:It seems it's trying to prune it as a luarocks package and not as a rocks-git package.
NOTE: I put some output logs on the rocks-git "prune" callback handler (rocks_git.get_prune_callback) and it seems that the prune callback isn't being called whereas the other handlers are being called when you run the "Rocks " action.
NOTE: If you run the prune command just using the repo name (no owner, ex. "unimpaired.nvim"), it removes the plugin spec from the rocks.toml file (I assume this is a final prune handler) but the repo still exists in the rocks-git rtp. You can then just run
:Rocks sync
after and that works but the prune command should work on its own with theowner/repo
name.The text was updated successfully, but these errors were encountered: