From 3384f816397a55238eb7092468b1f862bd29c300 Mon Sep 17 00:00:00 2001 From: siduck Date: Tue, 28 Feb 2023 09:23:07 +0530 Subject: [PATCH] load cached highlights whenever base46 updates --- lua/core/bootstrap.lua | 5 +---- lua/plugins/init.lua | 9 ++++++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index bca43c3..9080d3c 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -16,10 +16,7 @@ M.lazy = function(install_path) -- install plugins + compile their configs require "plugins" - - vim.fn.mkdir(vim.g.base46_cache, "p") - require("base46").load_all_highlights() - require("lazy").load { plugins = "nvim-treesitter" } + require("lazy").load { plugins = { "nvim-treesitter" } } -- install binaries from mason.nvim & tsparsers on LazySync vim.schedule(function() diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index b909d60..981c3c6 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -6,7 +6,14 @@ local default_plugins = { -- nvchad plugins { "NvChad/extensions", branch = "v2.0" }, - { "NvChad/base46", branch = "v2.0" }, + + { + "NvChad/base46", + branch = "v2.0", + build = function() + require("base46").load_all_highlights() + end, + }, { "NvChad/ui",