mirror of
https://github.com/gabehf/base46.git
synced 2026-03-09 07:28:50 -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
|
||||
|
||||
-- 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
|
||||
highlights = merge_tb(highlights, polish_hl)
|
||||
|
|
@ -25,7 +25,7 @@ end
|
|||
-- override user highlights if there are any
|
||||
if ui.hl_override then
|
||||
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"]
|
||||
-- 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 = {
|
||||
NvimTreeWinSeparator = {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ local M = {}
|
|||
local g = vim.g
|
||||
local config = require("core.utils").load_config()
|
||||
|
||||
M.get_theme_tb = function(name, type)
|
||||
local default_path = "base46.themes." .. name
|
||||
local user_path = "custom.themes." .. name
|
||||
M.get_theme_tb = function(type)
|
||||
local default_path = "base46.themes." .. g.nvchad_theme
|
||||
local user_path = "custom.themes." .. g.nvchad_theme
|
||||
|
||||
local present1, default_theme = pcall(require, default_path)
|
||||
local present2, user_theme = pcall(require, user_path)
|
||||
|
|
@ -18,11 +18,6 @@ M.get_theme_tb = function(name, type)
|
|||
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)
|
||||
return vim.tbl_deep_extend("force", table1, table2)
|
||||
end
|
||||
|
|
@ -80,13 +75,9 @@ end
|
|||
|
||||
M.load_theme = function()
|
||||
-- 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
|
||||
|
||||
if vim.g.theme_switcher_loaded then
|
||||
M.load_all_highlights()
|
||||
end
|
||||
|
||||
M.load_highlight "defaults"
|
||||
M.load_highlight "statusline"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
local colors = require("base46").get_colors "base_30"
|
||||
local colors = require("base46").get_theme_tb "base_30"
|
||||
|
||||
return {
|
||||
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 {
|
||||
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 {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
local base16 = require("base46").get_colors "base_16"
|
||||
local colors = require("base46").get_colors "base_30"
|
||||
local base16 = require("base46").get_theme_tb "base_16"
|
||||
local colors = require("base46").get_theme_tb "base_30"
|
||||
|
||||
return {
|
||||
-- nvim cmp
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
local colors = require("base46").get_colors "base_30"
|
||||
local theme = require("base46").get_colors "base_16"
|
||||
local colors = require("base46").get_theme_tb "base_30"
|
||||
local theme = require("base46").get_theme_tb "base_16"
|
||||
|
||||
return {
|
||||
MatchWord = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
local colors = require("base46").get_colors "base_30"
|
||||
local colors = require("base46").get_theme_tb "base_30"
|
||||
|
||||
return {
|
||||
DevIconDefault = { fg = colors.red },
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
local theme = require("base46").get_colors "base_16"
|
||||
local colors = require("base46").get_colors "base_30"
|
||||
local theme = require("base46").get_theme_tb "base_16"
|
||||
local colors = require("base46").get_theme_tb "base_30"
|
||||
|
||||
return {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
local colors = require("base46").get_colors "base_30"
|
||||
local colors = require("base46").get_theme_tb "base_30"
|
||||
|
||||
return {
|
||||
-- LSP References
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
local colors = require("base46").get_colors "base_30"
|
||||
local colors = require("base46").get_theme_tb "base_30"
|
||||
|
||||
return {
|
||||
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 {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
local theme = require("base46").get_colors "base_16"
|
||||
local theme = require("base46").get_theme_tb "base_16"
|
||||
|
||||
-- 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 {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
local theme = require("base46").get_colors "base_16"
|
||||
local theme = require("base46").get_theme_tb "base_16"
|
||||
|
||||
return {
|
||||
TSAnnotation = {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
local colors = require("base46").get_colors "base_30"
|
||||
local colors = require("base46").get_theme_tb "base_30"
|
||||
|
||||
return {
|
||||
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_1 = colors.base08
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue