mirror of
https://github.com/gabehf/base46.git
synced 2026-03-13 09:20:31 -07:00
rm usage of globals
This commit is contained in:
parent
168e5b08e7
commit
33f454a18b
2 changed files with 6 additions and 4 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
local config = require("core.utils").load_config()
|
||||||
|
|
||||||
M.get_theme_tb = function(name, type)
|
M.get_theme_tb = function(name, type)
|
||||||
local default_path = "hl_themes." .. name
|
local default_path = "hl_themes." .. name
|
||||||
local user_path = "custom.themes." .. name
|
local user_path = "custom.themes." .. name
|
||||||
|
|
@ -51,7 +53,7 @@ M.load_theme = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
M.override_theme = function(default_theme, theme_name)
|
M.override_theme = function(default_theme, theme_name)
|
||||||
local changed_themes = nvchad.load_config().ui.changed_themes
|
local changed_themes = config.ui.changed_themes
|
||||||
|
|
||||||
if changed_themes[theme_name] then
|
if changed_themes[theme_name] then
|
||||||
return M.merge_tb(default_theme, changed_themes[theme_name])
|
return M.merge_tb(default_theme, changed_themes[theme_name])
|
||||||
|
|
@ -61,7 +63,7 @@ M.override_theme = function(default_theme, theme_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
M.toggle_theme = function()
|
M.toggle_theme = function()
|
||||||
local themes = nvchad.load_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]
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local ui = nvchad.load_config().ui
|
local ui = require("core.utils").load_config().ui
|
||||||
|
|
||||||
local merge_tb = require("base46").merge_tb
|
local merge_tb = require("base46").merge_tb
|
||||||
|
|
||||||
|
|
@ -46,7 +46,7 @@ if ui.hl_override then
|
||||||
highlights = merge_tb(highlights, user_highlights)
|
highlights = merge_tb(highlights, user_highlights)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- local set_transparent = nvchad.load_config().ui.transparency
|
-- local set_transparent = require("core.utils").load_config().ui.transparency
|
||||||
if ui.transparency then
|
if ui.transparency then
|
||||||
highlights = merge_tb(highlights, require "nv_glassy")
|
highlights = merge_tb(highlights, require "nv_glassy")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue