packer.nvim icon indicating copy to clipboard operation
packer.nvim copied to clipboard

moving a local plugin to another folder doesn't work, packersync wont update the symlink to point at the new folder

Open teto opened this issue 2 years ago • 2 comments

  • nvim --version: v0.8.0-dev
  • Operating system/version: nixos
  • Terminal name/version: kitty

Steps to reproduce

Configure packer to use a local plugin, e.g.,: use "/home/teto/rest.nvim" run PackerSync and all. Change the path to for instance use "/home/teto/neovim/rest.nvim" (in my case I renamed /home/teto/rest.nvim to /home/teto/meovim/rest.nvim) . Restart rerun packersync and now you get ✗ Failed to install /home/teto/neovim/rest.nvim in the site folder I have a dangling symlink to /home/teto/rest.nvim.

Expected behaviour

I would expect packer to update the symlink ?

My solution so far has been to remove the symlink in .../pack/start/rest.nvim manually. PackerSync then works.

teto avatar Jun 21 '22 09:06 teto

How did you get packer to work on nixos

morphykuffour avatar Jul 12 '22 19:07 morphykuffour

@morphykuffour my setup is complex but here you go https://github.com/teto/home/blob/49f0e7a4e5e7770ba3619968ce6e3f7cf234de46/hm/profiles/neovim.nix#L334 (i use home manager)

teto avatar Jul 13 '22 08:07 teto

This is because local plugins have a stub update function. The update function should check if the current to links to the desired from.

EdenEast avatar Aug 15 '22 16:08 EdenEast