mirror of
https://github.com/gabehf/base46.git
synced 2026-03-16 18:55:56 -07:00
fix transparency not working completely
fixes https://github.com/NvChad/NvChad/issues/1070#issuecomment-1125920216
This commit is contained in:
parent
c88d5ea527
commit
00c34f5dd0
3 changed files with 56 additions and 37 deletions
|
|
@ -23,6 +23,14 @@ require "term_hl"
|
||||||
local user_highlights = nvchad.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)
|
||||||
|
|
||||||
|
-- local set_transparent = nvchad.load_config().ui.transparency
|
||||||
|
local ui = nvchad.load_config().ui
|
||||||
|
|
||||||
|
if ui.transparency then
|
||||||
|
local glassy_hls = require "nv_glassy"
|
||||||
|
highlights = merge_tb(highlights, glassy_hls)
|
||||||
|
end
|
||||||
|
|
||||||
-- finally set all highlights :D
|
-- finally set all highlights :D
|
||||||
for hl, col in pairs(highlights) do
|
for hl, col in pairs(highlights) do
|
||||||
vim.api.nvim_set_hl(0, hl, col)
|
vim.api.nvim_set_hl(0, hl, col)
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,8 @@
|
||||||
local colors = require("base46").get_colors "base_30"
|
local colors = require("base46").get_colors "base_30"
|
||||||
local ui = nvchad.load_config().ui
|
|
||||||
|
|
||||||
local black = colors.black
|
local black = colors.black
|
||||||
local black2 = colors.black2
|
|
||||||
local blue = colors.blue
|
local blue = colors.blue
|
||||||
local darker_black = colors.darker_black
|
local darker_black = colors.darker_black
|
||||||
local folder_bg = colors.folder_bg
|
|
||||||
local green = colors.green
|
local green = colors.green
|
||||||
local grey = colors.grey
|
local grey = colors.grey
|
||||||
local grey_fg = colors.grey_fg
|
local grey_fg = colors.grey_fg
|
||||||
|
|
@ -89,7 +86,6 @@ local defaults = {
|
||||||
DiagnosticInformation = { fg = green },
|
DiagnosticInformation = { fg = green },
|
||||||
|
|
||||||
-- whichkey
|
-- whichkey
|
||||||
|
|
||||||
WhichKey = { fg = blue },
|
WhichKey = { fg = blue },
|
||||||
WhichKeySeparator = { fg = light_grey },
|
WhichKeySeparator = { fg = light_grey },
|
||||||
WhichKeyDesc = { fg = red },
|
WhichKeyDesc = { fg = red },
|
||||||
|
|
@ -97,37 +93,4 @@ local defaults = {
|
||||||
WhichKeyValue = { fg = green },
|
WhichKeyValue = { fg = green },
|
||||||
}
|
}
|
||||||
|
|
||||||
if ui.transparency then
|
|
||||||
local hl_groups = {
|
|
||||||
"NormalFloat",
|
|
||||||
"Normal",
|
|
||||||
"Folded",
|
|
||||||
"NvimTreeNormal",
|
|
||||||
"NvimTreeNormalNC",
|
|
||||||
"TelescopeNormal",
|
|
||||||
"TelescopePrompt",
|
|
||||||
"TelescopeResults",
|
|
||||||
"TelescopeBorder",
|
|
||||||
"TelescopePromptBorder",
|
|
||||||
"TelescopePromptNormal",
|
|
||||||
"TelescopePromptPrefix",
|
|
||||||
}
|
|
||||||
|
|
||||||
for index, _ in ipairs(hl_groups) do
|
|
||||||
defaults[hl_groups[index]] = {
|
|
||||||
bg = "NONE",
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
defaults.NvimTreeWinSeparator = {
|
|
||||||
fg = grey,
|
|
||||||
bg = "NONE",
|
|
||||||
}
|
|
||||||
|
|
||||||
defaults.TelescopeResultsTitle = {
|
|
||||||
fg = black,
|
|
||||||
bg = blue,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
return defaults
|
return defaults
|
||||||
|
|
|
||||||
48
lua/nv_glassy.lua
Normal file
48
lua/nv_glassy.lua
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
local colors = require("base46").get_colors "base_30"
|
||||||
|
|
||||||
|
local M = {
|
||||||
|
NvimTreeWinSeparator = {
|
||||||
|
fg = colors.one_bg2,
|
||||||
|
bg = "NONE",
|
||||||
|
},
|
||||||
|
|
||||||
|
TelescopeResultsTitle = {
|
||||||
|
fg = colors.black,
|
||||||
|
bg = colors.blue,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- for hl groups which need bg = "NONE" only!
|
||||||
|
local hl_groups = {
|
||||||
|
"NormalFloat",
|
||||||
|
"Normal",
|
||||||
|
"Folded",
|
||||||
|
"NvimTreeNormal",
|
||||||
|
"NvimTreeNormalNC",
|
||||||
|
"NvimTreeCursorLine",
|
||||||
|
"TelescopeNormal",
|
||||||
|
"TelescopePrompt",
|
||||||
|
"TelescopeResults",
|
||||||
|
"TelescopePromptNormal",
|
||||||
|
"TelescopePromptPrefix",
|
||||||
|
"CursorLine",
|
||||||
|
"Pmenu",
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, groups in ipairs(hl_groups) do
|
||||||
|
M[groups] = {
|
||||||
|
bg = "NONE",
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
M.TelescopeBorder = {
|
||||||
|
fg = colors.grey,
|
||||||
|
bg = "NONE",
|
||||||
|
}
|
||||||
|
|
||||||
|
M.TelescopePromptBorder = {
|
||||||
|
fg = colors.grey,
|
||||||
|
bg = "NONE",
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
||||||
Loading…
Add table
Add a link
Reference in a new issue