sainnhe / edge

Clean & Elegant Color Scheme inspired by Atom One and Material
MIT License
869 stars 56 forks source link

Latest update (2020-08-01) causes errors on vim HEAD and nvim HEAD #16

Closed telemachus closed 4 years ago

telemachus commented 4 years ago

First, thanks so much for edge. I see that you just updated the colorscheme, and on both vim HEAD and nvim head, it leads to issues:

Error detected while processing /Users/telemachus/.vimrc[82]../Users/telemachus/.vim/pack/bundle/start/edge/colors/edge.vim:
line   21:
E117: Unknown function: edge#get_configuration
line   22:
E121: Undefined variable: s:configuration
E116: Invalid arguments for function edge#get_palette(s:configuration.style)
line   29:
E121: Undefined variable: s:configuration
line   51:
E121: Undefined variable: s:palette
E116: Invalid arguments for function edge#highlight
line   52:
E121: Undefined variable: s:palette
E116: Invalid arguments for function edge#highlight
line   53:
E121: Undefined variable: s:palette
E116: Invalid arguments for function edge#highlight
line   54:
... (followed by many many more of the same errors re s:palette)

I will try to dig into this myself since I saw your post about the maintenance status of edge, but I wanted to let you know.

In case it helps, here are more details about my system and editor versions:

sainnhe commented 4 years ago

There is a bug with pack feature, the autoload/edge.vim was not sourced. Your problem won't appear if you install this color scheme to your ~/.vim or use set runtimepath+=/path/to/edge by another plugin manager like vim-plug.

A temporary solution is sourcing the autoload/edge.vim manually before applying this color scheme:

source /path/to/edge/autoload/edge.vim
colo edge
telemachus commented 4 years ago

Thanks for this tip. I’ll try it. One question, however: if the bug is a general one in pack, why do other colorschemes installed in .vim/pack/bundle/start still work? Any idea what the difference might be?

sainnhe commented 4 years ago

Because they didn't use a autoload file. You can try onedark.vim which also used autoload, it should crash, too.

telemachus commented 4 years ago

Thanks: I should have guessed that. For the moment, I've fixed it by adding a manual call packadd! edge before I ask for edge. Thanks for your help.