Open blueyed opened 3 years ago
Thanks @blueyed -- I tested this and it does fix my issue as reported in https://github.com/numirias/semshi/issues/90#issuecomment-929186760 (which would have been more appropriately reported as part of #70).
Can confirm this fix handles updates to syntax/colorscheme after load.
To test this PR's changes with VimPlug:
"Plug 'numirias/semshi', { 'do': ':UpdateRemotePlugins' }
Plug 'blueyed/semshi', { 'branch': 'handle-ColorScheme', 'do': ':UpdateRemotePlugins' }
When using
:colorscheme
highlights are deleted, and need to be re-defined.This wraps/moves this into
semshi#init()
, and triggers it on theColorScheme
autocommand.It also wraps this and the conditional definition of the other autocommands in a new
SemshiInit
augroup, to not define the autocommands multiple times.Fixes https://github.com/numirias/semshi/issues/70.