josean-dev/dev-environment-files

LuaSnip failing to update

Closed this issue · 6 comments

I have this error message I fail to resolve while attempting to update LuaSnip:

Failed (1)
LuaSnip 6.77ms vim-cmp fetch failed
Fetching submodule reps/jsregexp
fatal: cannot chdir to '../../../../deps/jsregexp': No such file or directory
Errors during submodule fetch:
dips/jsregexp

The problem started with the advise I got to delete the directory dips/jsregexp for the LuaSnip updates to work.
When that did not help LuaSnip to update, I re-created the directory dips/jsregexp

Now I do not know how to resolve the "fetch failed"

I had the same issue. I uninstalled and reinstalled luasnip. The problem went away. I investigated a little bit, it's related to the submodule feature of git. I don't have any experience working with git submodules, so I tried the simplest approach and it worked.

If I remember correctly, I only used the lazy UI to uninstall and reinstall LuaSnip. Try the following steps to restore submodules as required by HEAD of parent repo.

cd <nvim-data>/lazy/LuaSnip
git submodule update

Then try lazy UI from nvim as usual. The git submodule update should restore the submodules to the proper state. If this doesn't help, try deinit followed by update as explained here.

git submodule deinit --force .
git submodule update --init --recursive --checkout

Parthbera:
Thanks. Your tips saved the day!

Parthbera:
Thanks. Your tips saved the day!