Closed Shatur closed 3 years ago
Can you try now? Note that now in your colorscheme you have to check for exists(':VMTheme')
, not exists('g:loaded_visual_multi')
.
See :h vm-colorschemes
Yes, it worked, thank you!
Should I really check for exists(':VMTheme')
? I probably can just set this variable unconditionally.
Should I really check for exists(':VMTheme')?
My mistake... It should work also with exists('g:loaded_visual_multi')
.
Edit: you can skip the check, but then highlight groups are also set if VM isn't loaded/used.
Edit: you can skip the check, but then highlight groups are also set if VM isn't loaded/used.
Hm... Usually most colorschemes do not check for plugins when loading.
Sure, it's up to you.
Describe the issue:
I trying to add highlighting groups to my theme. I did it exactly as specified in
:h vm-colorschemes
(e.g. I setg:VM_theme_set_by_colorscheme
in theme file). But the colors are only applied if the colorscheme is loaded aftervim-visual-multi
. So If I set theme later, then colors from the theme will be applied. If the user is using a third party plugin manager, then this can be easily fixed by using the load order. But if the user uses the native (built-in) plugin manager from Vim8, then this becomes problematic.Suggestion Currently the option
g:VM_theme_set_by_colorscheme
is not permanent and will be removed by plugin on applying theme. Usually such options are not typical for a plugin. I would suggest making this option permanent and completely disabling the theme engine if it is set.