fix: catch errors setting up rtp when plugin not installed
I was getting E5108 sometimes when a plugin that loads on start wasn't installed. That interrupted Lazy's load, preventing me from then using it to install the missing plugin.
On Windows it happened every time, on Linux it was about every 2nd time.
I'm hoping I've figured out enough of the codebase conventions for this to be written appropriately, but it was only a quick skim so apologies if I've missed an internal logging function.
I'm a bit hesitant to merge this, since this really should never trigger an error.
What was the exact error you get?
That's what I expected too, and yet it happened consistently. I should note that if automatic installation was enabled, I could usually get around this.
I can't recall the exact error, but it was a neovim error relating to an error in setopt while setting rtp.
It may have had something to do with how I set up Lazy, but I'm using it through more or less the lazyvim recommended way, albeit from a custom rtp lua folder stored in dotfiles. Now I think about it.
Welcome back! Hope you had a great vacation, thanks for taking the time to go back and address all these tickets.
Personally I feel a small error catching line that solves someone's odd problem is a "may as well" merge. However, I recognise that you have your own standards for codebase tidiness and that you can't trust random users, so I'm happy to keep the discussion going about whether you merge. It'd make my use of lazy a lot easier if it is though
I hadn't realised how generic E5108 is, oops. I should have included the error message. I'll see if I can repro
Yeah, E5108 is indeed a very general lua error, so would be good to see what the exact message was you got.