From 0ead86afe390603f9bd688103d7a5fc6724a828e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 29 Jun 2021 09:44:01 +0200 Subject: [PATCH] perf: only do hi clear when non default colorscheme is active --- lua/tokyonight/util.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/tokyonight/util.lua b/lua/tokyonight/util.lua index b4120d6..882d64b 100644 --- a/lua/tokyonight/util.lua +++ b/lua/tokyonight/util.lua @@ -222,7 +222,10 @@ end ---@param theme Theme function util.load(theme) - vim.cmd("hi clear") + -- only needed to clear when not the default colorscheme + if vim.g.colors_name then + vim.cmd("hi clear") + end -- if vim.fn.exists("syntax_on") then -- vim.cmd("syntax reset") -- end