Open unnamed42 opened 6 years ago
Hey, @unnamed42. Thanks for creating this issue. I've also experienced problems with lazy loading color_coded and have typically just disabled the lazy loading, so I never looked much into it.
Both VimEnter
and ColorScheme
are captured there, since we want to reload color_coded whenever the colorscheme changes and we also want to load it on startup (or do we?). Perhaps a better solution is to use another event which only triggers upon the plugin being loaded. I'm not too sure of how to hygienically lazy load plugins at this moment; do you know of some better suited events we should hook instead?
According to the wiki page, when some plugin is lazy loaded, vim-plug will fire a User
event whose name is the same as the plugin. So I add a line after syntax loader:
au User color_coded source $VIMHOME/after/syntax/color_coded.vim
And everything looks OK now.
Wow, great find. We may want to keep all three then. VimEnter
, ColorScheme
, and User color_coded
.
Can confirm that this fixes the issue. Do you want to make a PR for this @unnamed42?
As is described in title, vim-plug won't load
after/syntax/color_coded.vim
if is set to lazy loading, like:I've found the code for loading syntax, in
plugin/color_coded.vim
:Maybe both
VimEnter
andColorScheme
are not captured.