From cb60ccc842c019ab2d2da42800acc4fce2226396 Mon Sep 17 00:00:00 2001 From: Steven C Date: Sat, 9 Mar 2024 19:34:33 -0500 Subject: [PATCH] Update refernce to chadrc.lua (#290) Due to upgrading from v2.0 to v2.5, the `custom` directory was eliminated. This make the reference to `chadrc.lua` incorrect which causes an error when calling `toggle_transparency()`. --- lua/base46/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/base46/init.lua b/lua/base46/init.lua index c5281fd..cde4f0b 100644 --- a/lua/base46/init.lua +++ b/lua/base46/init.lua @@ -158,7 +158,7 @@ M.toggle_theme = function() config.ui.theme = (themes[1] == config.ui.theme and themes[2]) or themes[1] - local old_theme = dofile(vim.fn.stdpath "config" .. "/lua/custom/chadrc.lua").ui.theme + local old_theme = dofile(vim.fn.stdpath "config" .. "/lua/chadrc.lua").ui.theme require("nvchad.utils").replace_word(old_theme, config.ui.theme) M.load_all_highlights() end @@ -167,7 +167,7 @@ M.toggle_transparency = function() config.ui.transparency = not config.ui.transparency M.load_all_highlights() - local old_transparency_val = dofile(vim.fn.stdpath "config" .. "/lua/custom/chadrc.lua").ui.transparency + local old_transparency_val = dofile(vim.fn.stdpath "config" .. "/lua/chadrc.lua").ui.transparency local new_transparency_val = "transparency = " .. tostring(config.ui.transparency) require("nvchad.utils").replace_word("transparency = " .. tostring(old_transparency_val), new_transparency_val) end