mirror of
https://github.com/gabehf/base46.git
synced 2026-03-15 10:15:55 -07:00
This commit is contained in:
parent
a559c8dfaa
commit
45421bc921
18 changed files with 25 additions and 34 deletions
|
|
@ -16,7 +16,7 @@ for _, file in ipairs(hl_files) do
|
||||||
end
|
end
|
||||||
|
|
||||||
-- polish theme specific highlights
|
-- polish theme specific highlights
|
||||||
local polish_hl = require("base46").get_colors "polish_hl"
|
local polish_hl = require("base46").get_theme_tb "polish_hl"
|
||||||
|
|
||||||
if polish_hl then
|
if polish_hl then
|
||||||
highlights = merge_tb(highlights, polish_hl)
|
highlights = merge_tb(highlights, polish_hl)
|
||||||
|
|
@ -25,7 +25,7 @@ end
|
||||||
-- override user highlights if there are any
|
-- override user highlights if there are any
|
||||||
if ui.hl_override then
|
if ui.hl_override then
|
||||||
local user_highlights = ui.hl_override
|
local user_highlights = ui.hl_override
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
|
|
||||||
-- fg = "white" set by user becomes fg = colors["white"]
|
-- fg = "white" set by user becomes fg = colors["white"]
|
||||||
-- so no need for the user to import colors
|
-- so no need for the user to import colors
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
NvimTreeWinSeparator = {
|
NvimTreeWinSeparator = {
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@ local M = {}
|
||||||
local g = vim.g
|
local g = vim.g
|
||||||
local config = require("core.utils").load_config()
|
local config = require("core.utils").load_config()
|
||||||
|
|
||||||
M.get_theme_tb = function(name, type)
|
M.get_theme_tb = function(type)
|
||||||
local default_path = "base46.themes." .. name
|
local default_path = "base46.themes." .. g.nvchad_theme
|
||||||
local user_path = "custom.themes." .. name
|
local user_path = "custom.themes." .. g.nvchad_theme
|
||||||
|
|
||||||
local present1, default_theme = pcall(require, default_path)
|
local present1, default_theme = pcall(require, default_path)
|
||||||
local present2, user_theme = pcall(require, user_path)
|
local present2, user_theme = pcall(require, user_path)
|
||||||
|
|
@ -18,11 +18,6 @@ M.get_theme_tb = function(name, type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
M.get_colors = function(type)
|
|
||||||
local name = g.nvchad_theme
|
|
||||||
return M.get_theme_tb(name, type)
|
|
||||||
end
|
|
||||||
|
|
||||||
M.merge_tb = function(table1, table2)
|
M.merge_tb = function(table1, table2)
|
||||||
return vim.tbl_deep_extend("force", table1, table2)
|
return vim.tbl_deep_extend("force", table1, table2)
|
||||||
end
|
end
|
||||||
|
|
@ -80,13 +75,9 @@ end
|
||||||
|
|
||||||
M.load_theme = function()
|
M.load_theme = function()
|
||||||
-- set bg option
|
-- set bg option
|
||||||
local theme_type = M.get_theme_tb(g.nvchad_theme, "type") -- dark/light
|
local theme_type = M.get_theme_tb "type" -- dark/light
|
||||||
vim.opt.bg = theme_type
|
vim.opt.bg = theme_type
|
||||||
|
|
||||||
if vim.g.theme_switcher_loaded then
|
|
||||||
M.load_all_highlights()
|
|
||||||
end
|
|
||||||
|
|
||||||
M.load_highlight "defaults"
|
M.load_highlight "defaults"
|
||||||
M.load_highlight "statusline"
|
M.load_highlight "statusline"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
AlphaHeader = { fg = colors.grey_fg },
|
AlphaHeader = { fg = colors.grey_fg },
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
IndentBlanklineChar = { fg = colors.line },
|
IndentBlanklineChar = { fg = colors.line },
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local base16 = require("base46").get_colors "base_16"
|
local base16 = require("base46").get_theme_tb "base_16"
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- nvim cmp
|
-- nvim cmp
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
local theme = require("base46").get_colors "base_16"
|
local theme = require("base46").get_theme_tb "base_16"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
MatchWord = {
|
MatchWord = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
DevIconDefault = { fg = colors.red },
|
DevIconDefault = { fg = colors.red },
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
local theme = require("base46").get_colors "base_16"
|
local theme = require("base46").get_theme_tb "base_16"
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- LSP References
|
-- LSP References
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
NvimTreeEmptyFolderName = { fg = colors.folder_bg },
|
NvimTreeEmptyFolderName = { fg = colors.folder_bg },
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local theme = require("base46").get_colors "base_16"
|
local theme = require("base46").get_theme_tb "base_16"
|
||||||
|
|
||||||
-- Standard syntax highlighting
|
-- Standard syntax highlighting
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local theme = require("base46").get_colors "base_16"
|
local theme = require("base46").get_theme_tb "base_16"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
TSAnnotation = {
|
TSAnnotation = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_theme_tb "base_30"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
WhichKey = { fg = colors.blue },
|
WhichKey = { fg = colors.blue },
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local colors = require("base46").get_colors "base_16"
|
local colors = require("base46").get_theme_tb "base_16"
|
||||||
|
|
||||||
vim.g.terminal_color_0 = colors.base02
|
vim.g.terminal_color_0 = colors.base02
|
||||||
vim.g.terminal_color_1 = colors.base08
|
vim.g.terminal_color_1 = colors.base08
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue