mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-24 05:21:04 +00:00
transparency
This commit is contained in:
parent
118453110e
commit
e2bc0d8e2b
2 changed files with 62 additions and 0 deletions
|
|
@ -29,6 +29,7 @@
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
|
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
|
||||||
|
"transparent.nvim": { "branch": "main", "commit": "8ac59883de84e9cd1850ea25cf087031c5ba7d54" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||||
"ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" },
|
"ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" },
|
||||||
"typescript-tools.nvim": { "branch": "master", "commit": "c2f5910074103705661e9651aa841e0d7eea9932" },
|
"typescript-tools.nvim": { "branch": "master", "commit": "c2f5910074103705661e9651aa841e0d7eea9932" },
|
||||||
|
|
|
||||||
61
lua/plugins/transparency.lua
Normal file
61
lua/plugins/transparency.lua
Normal file
|
|
@ -0,0 +1,61 @@
|
||||||
|
local function apply_transparency()
|
||||||
|
local groups = {
|
||||||
|
"Normal",
|
||||||
|
"NormalNC",
|
||||||
|
"NormalFloat",
|
||||||
|
"FloatBorder",
|
||||||
|
"SignColumn",
|
||||||
|
"LineNr",
|
||||||
|
"CursorLineNr",
|
||||||
|
"EndOfBuffer",
|
||||||
|
"TelescopeNormal",
|
||||||
|
"TelescopeBorder",
|
||||||
|
"TelescopePromptBorder",
|
||||||
|
"TelescopeResultsBorder",
|
||||||
|
"TelescopePreviewBorder",
|
||||||
|
"NeoTreeNormal",
|
||||||
|
"NeoTreeNormalNC",
|
||||||
|
"NeoTreeWinSeparator",
|
||||||
|
"NeoTreeEndOfBuffer",
|
||||||
|
"Pmenu",
|
||||||
|
"PmenuSel",
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, group in ipairs(groups) do
|
||||||
|
vim.api.nvim_set_hl(0, group, { bg = "none" })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = function()
|
||||||
|
vim.cmd("colorscheme tokyonight") -- or your theme
|
||||||
|
apply_transparency()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Automatically re-apply transparency when UI elements refresh
|
||||||
|
{
|
||||||
|
"xiyaowong/transparent.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = function()
|
||||||
|
-- when floats open
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = {
|
||||||
|
"SnacksPickerOpen",
|
||||||
|
"SnacksPickerClose",
|
||||||
|
"LazyVimFloat",
|
||||||
|
},
|
||||||
|
callback = apply_transparency,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- when switching colorscheme
|
||||||
|
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||||
|
callback = apply_transparency,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue