From c58d8a76fcd31462ef707c55d9f4147c3927721f Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 7 Nov 2024 20:06:35 +0530 Subject: [PATCH] trigger NvThemeReload user autocmd whenever theme reloads --- lua/base46/init.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lua/base46/init.lua b/lua/base46/init.lua index 482d2cb5..248ba818 100644 --- a/lua/base46/init.lua +++ b/lua/base46/init.lua @@ -163,18 +163,16 @@ M.load_all_highlights = function() require("plenary.reload").reload_module "base46" M.compile() - if not opts.compile_all then - for _, name in ipairs(integrations) do - dofile(vim.g.base46_cache .. name) - end - else - dofile(vim.g.base46_cache .. "all") + for _, name in ipairs(integrations) do + dofile(vim.g.base46_cache .. name) end -- update blankline pcall(function() require("ibl").update() end) + + vim.api.nvim_exec_autocmds("User", { pattern = "NvThemeReload" }) end M.override_theme = function(default_theme, theme_name)