mirror of
https://github.com/gabehf/base46.git
synced 2026-03-17 03:06:30 -07:00
refactor: utils are in the global scope now
This commit is contained in:
parent
a0d1322b9e
commit
8ac4b01da2
4 changed files with 12 additions and 5 deletions
7
.luarc.json
Normal file
7
.luarc.json
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
||||||
|
"Lua.diagnostics.globals": [
|
||||||
|
"vim",
|
||||||
|
"nvchad"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -6,7 +6,7 @@ M.get_colors = function(type)
|
||||||
if vim.g.nvchad_theme then
|
if vim.g.nvchad_theme then
|
||||||
name = vim.g.nvchad_theme
|
name = vim.g.nvchad_theme
|
||||||
else
|
else
|
||||||
name = require("core.utils").load_config().ui.theme
|
name = nvchad.load_config().ui.theme
|
||||||
vim.g.nvchad_theme = name
|
vim.g.nvchad_theme = name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -52,7 +52,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 = require("core.utils").load_config().ui.changed_themes
|
local changed_themes = nvchad.load_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])
|
||||||
|
|
@ -62,7 +62,7 @@ M.override_theme = function(default_theme, theme_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
M.toggle_theme = function()
|
M.toggle_theme = function()
|
||||||
local themes = require("core.utils").load_config().ui.theme_toggle
|
local themes = nvchad.load_config().ui.theme_toggle
|
||||||
|
|
||||||
local theme1 = themes[1]
|
local theme1 = themes[1]
|
||||||
local theme2 = themes[2]
|
local theme2 = themes[2]
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ end
|
||||||
require "term_hl"
|
require "term_hl"
|
||||||
|
|
||||||
-- override user highlights if there are any
|
-- override user highlights if there are any
|
||||||
local user_highlights = require("core.utils").load_config().ui.hl_override
|
local user_highlights = nvchad.load_config().ui.hl_override
|
||||||
highlights = merge_tb(highlights, user_highlights)
|
highlights = merge_tb(highlights, user_highlights)
|
||||||
|
|
||||||
-- finally set all highlights :D
|
-- finally set all highlights :D
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_colors "base_30"
|
||||||
local ui = require("core.utils").load_config().ui
|
local ui = nvchad.load_config().ui
|
||||||
|
|
||||||
local black = colors.black
|
local black = colors.black
|
||||||
local black2 = colors.black2
|
local black2 = colors.black2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue