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()`.
v2.5
Steven C 2 years ago committed by GitHub
parent e3427f6a6c
commit cb60ccc842
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -158,7 +158,7 @@ M.toggle_theme = function()
config.ui.theme = (themes[1] == config.ui.theme and themes[2]) or themes[1] 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) require("nvchad.utils").replace_word(old_theme, config.ui.theme)
M.load_all_highlights() M.load_all_highlights()
end end
@ -167,7 +167,7 @@ M.toggle_transparency = function()
config.ui.transparency = not config.ui.transparency config.ui.transparency = not config.ui.transparency
M.load_all_highlights() 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) local new_transparency_val = "transparency = " .. tostring(config.ui.transparency)
require("nvchad.utils").replace_word("transparency = " .. tostring(old_transparency_val), new_transparency_val) require("nvchad.utils").replace_word("transparency = " .. tostring(old_transparency_val), new_transparency_val)
end end

Loading…
Cancel
Save