From 1df055e348b7f0d24f3f488c0a76da627af6b6a9 Mon Sep 17 00:00:00 2001 From: Joey Baker Date: Thu, 24 Sep 2020 02:18:46 -0700 Subject: [PATCH] Fix trigger colorscheme autocommand (#23) Some plugins like vim-coc rely on the colorscheme autocommand to apply their overrides to themes. Because we're using `execute` instead of calling `colorscheme` directly, we have to manually trigger the event. --- autoload/thematic.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoload/thematic.vim b/autoload/thematic.vim index 068756e..d142477 100644 --- a/autoload/thematic.vim +++ b/autoload/thematic.vim @@ -166,11 +166,13 @@ function! thematic#init(mode) abort let l:cs = get(l:th, 'colorscheme', l:theme_name) try execute 'colorscheme ' . l:cs + doautoall colorscheme catch /E185:/ " no colorscheme matching the theme name, so fall back to original, if any if has_key(g:thematic#original, 'colorscheme') let l:cs = g:thematic#original.colorscheme execute 'colorscheme ' . l:cs + doautoall colorscheme endif endtry