diff --git a/README.md b/README.md index 0f58a9f..cbad55b 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ M.base_16 = { -- some colors } -M = require("base16").override_theme(M, "atheme") +M = require("base46").override_theme(M, "atheme") return M ``` @@ -30,7 +30,7 @@ return M - Use a color lightening/darkening tool, such as this https://siduck.github.io/hex-tools/ ``` -black = usually your theme bg (this should be the same as base00 in doom-base16.lua) +black = usually your theme bg darker_black = 6% darker than black black2 = 6% lighter than black diff --git a/lua/base16.lua b/lua/base16.lua deleted file mode 100644 index 4b81ec4..0000000 --- a/lua/base16.lua +++ /dev/null @@ -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 diff --git a/lua/chadlights.lua b/lua/chadlights.lua index 7ccce0c..9898fc0 100644 --- a/lua/chadlights.lua +++ b/lua/chadlights.lua @@ -16,6 +16,9 @@ for _, file in ipairs(hl_files) do highlights = merge_tb(highlights, integration) end +-- term colors +require "term_hl" + -- override user highlights if there are any local user_highlights = require("core.utils").load_config().ui.hl_override highlights = merge_tb(highlights, user_highlights) diff --git a/lua/hl_themes/radium.lua b/lua/hl_themes/radium.lua index 9b20a28..be228b8 100644 --- a/lua/hl_themes/radium.lua +++ b/lua/hl_themes/radium.lua @@ -53,6 +53,6 @@ M.base_16 = { base0F = "#e87979", } -M = require("base16").override_theme(M, "radium") +M = require("base46").override_theme(M, "radium") return M diff --git a/lua/hl_themes/rxyhn.lua b/lua/hl_themes/rxyhn.lua index 9408d1f..d3ea0dd 100644 --- a/lua/hl_themes/rxyhn.lua +++ b/lua/hl_themes/rxyhn.lua @@ -53,6 +53,6 @@ M.base_16 = { base0F = "#F16269", } -M = require("base16").override_theme(M, "rxyhn") +M = require("base46").override_theme(M, "rxyhn") return M diff --git a/lua/term_hl.lua b/lua/term_hl.lua new file mode 100644 index 0000000..79b7288 --- /dev/null +++ b/lua/term_hl.lua @@ -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