mirror of https://github.com/gabehf/base46.git
parent
1fdb81e1f7
commit
b6906663f7
@ -1,51 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.get_colors = function(type)
|
|
||||||
local name
|
|
||||||
|
|
||||||
if vim.g.nvchad_theme then
|
|
||||||
name = vim.g.nvchad_theme
|
|
||||||
else
|
|
||||||
name = require("core.utils").load_config().ui.theme
|
|
||||||
vim.g.nvchad_theme = name
|
|
||||||
end
|
|
||||||
|
|
||||||
-- theme paths
|
|
||||||
local default_path = "hl_themes." .. name
|
|
||||||
local user_path = "custom.themes." .. name
|
|
||||||
|
|
||||||
local present1, default_theme = pcall(require, default_path)
|
|
||||||
local present2, user_theme = pcall(require, user_path)
|
|
||||||
|
|
||||||
if present1 then
|
|
||||||
return default_theme[type]
|
|
||||||
elseif present2 then
|
|
||||||
return user_theme[type]
|
|
||||||
else
|
|
||||||
error "No such theme bruh >_< "
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
M.merge_tb = function(table1, table2)
|
|
||||||
return vim.tbl_deep_extend("force", table1, table2)
|
|
||||||
end
|
|
||||||
|
|
||||||
M.load_theme = function()
|
|
||||||
-- reload highlights for theme switcher
|
|
||||||
require("plenary.reload").reload_module "integrations"
|
|
||||||
require("plenary.reload").reload_module "chadlights"
|
|
||||||
|
|
||||||
require "chadlights"
|
|
||||||
end
|
|
||||||
|
|
||||||
M.override_theme = function(default_theme, theme_name)
|
|
||||||
local changed_themes = require("core.utils").load_config().ui.changed_themes
|
|
||||||
|
|
||||||
if changed_themes[theme_name] then
|
|
||||||
return M.merge_tb(default_theme, changed_themes[theme_name])
|
|
||||||
else
|
|
||||||
return default_theme
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
local colors = require("base46").get_colors "base_16"
|
||||||
|
|
||||||
|
vim.g.terminal_color_0 = "#" .. colors.base00
|
||||||
|
vim.g.terminal_color_1 = "#" .. colors.base08
|
||||||
|
vim.g.terminal_color_2 = "#" .. colors.base0B
|
||||||
|
vim.g.terminal_color_3 = "#" .. colors.base0A
|
||||||
|
vim.g.terminal_color_4 = "#" .. colors.base0D
|
||||||
|
vim.g.terminal_color_5 = "#" .. colors.base0E
|
||||||
|
vim.g.terminal_color_6 = "#" .. colors.base0C
|
||||||
|
vim.g.terminal_color_7 = "#" .. colors.base05
|
||||||
|
vim.g.terminal_color_8 = "#" .. colors.base03
|
||||||
|
vim.g.terminal_color_9 = "#" .. colors.base08
|
||||||
|
vim.g.terminal_color_10 = "#" .. colors.base0B
|
||||||
|
vim.g.terminal_color_11 = "#" .. colors.base0A
|
||||||
|
vim.g.terminal_color_12 = "#" .. colors.base0D
|
||||||
|
vim.g.terminal_color_13 = "#" .. colors.base0E
|
||||||
|
vim.g.terminal_color_14 = "#" .. colors.base0C
|
||||||
|
vim.g.terminal_color_15 = "#" .. colors.base07
|
||||||
Loading…
Reference in new issue