mirror of
https://github.com/gabehf/base46.git
synced 2026-03-13 01:10:31 -07:00
rm outdated functions from toggle_theme function
This commit is contained in:
parent
28b362e4f0
commit
b63b26aae7
1 changed files with 11 additions and 17 deletions
|
|
@ -165,30 +165,24 @@ end
|
||||||
|
|
||||||
M.toggle_theme = function()
|
M.toggle_theme = function()
|
||||||
local themes = config.ui.theme_toggle
|
local themes = config.ui.theme_toggle
|
||||||
|
|
||||||
local theme1 = themes[1]
|
local theme1 = themes[1]
|
||||||
local theme2 = themes[2]
|
local theme2 = themes[2]
|
||||||
|
|
||||||
if g.nvchad_theme == theme1 or g.nvchad_theme == theme2 then
|
if g.nvchad_theme ~= theme1 and g.nvchad_theme ~= theme2 then
|
||||||
if g.toggle_theme_icon == " " then
|
vim.notify "Set your current theme to one of those mentioned in the theme_toggle table (chadrc)"
|
||||||
g.toggle_theme_icon = " "
|
return
|
||||||
else
|
|
||||||
g.toggle_theme_icon = " "
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
M.load_all_highlights()
|
||||||
|
|
||||||
if g.nvchad_theme == theme1 then
|
if g.nvchad_theme == theme1 then
|
||||||
g.nvchad_theme = theme2
|
g.toggle_theme_icon = " "
|
||||||
|
vim.g.nvchad_theme = theme2
|
||||||
require("nvchad").reload_theme()
|
require("nvchad").replace_word(theme1, theme2)
|
||||||
require("nvchad").change_theme(theme1, theme2)
|
|
||||||
elseif g.nvchad_theme == theme2 then
|
|
||||||
g.nvchad_theme = theme1
|
|
||||||
|
|
||||||
require("nvchad").reload_theme()
|
|
||||||
require("nvchad").change_theme(theme2, theme1)
|
|
||||||
else
|
else
|
||||||
vim.notify "Set your current theme to one of those mentioned in the theme_toggle table (chadrc)"
|
vim.g.nvchad_theme = theme1
|
||||||
|
g.toggle_theme_icon = " "
|
||||||
|
require("nvchad").replace_word(theme2, theme1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue