raddari / last-color.nvim

Remember your last call to :colorscheme between restarts
GNU General Public License v3.0
17 stars 2 forks source link

Bug: Some colorschemes don't load properly #2

Closed sergiornelas closed 2 years ago

sergiornelas commented 2 years ago

Hello (again 😆), for a strange reason some colorschemes don't load and crash: Vim(colorscheme):E185: Cannot find color scheme

You can test it using one of the colorschemes of this repo: https://github.com/ray-x/starry.nvim

Thanks you!

sergiornelas commented 2 years ago

Never mind, looks like those colorschemes in that repo (starry.nvim) have a random loader algorithm running underneath, that's why last-color crashes.

raddari commented 2 years ago

Hey, I decided to take a look into this anyway. I see what you mean with the random loader algorithm - colorscheme is being called twice every time a starry scheme is used, and it looks like last-color is saving the wrong call.

I might be able to hotfix this with an autocommand pattern, I'll look into it.

raddari commented 2 years ago

That should fix it - feel free to reopen if the problem happens with another colorscheme :)