pojokcodeid.nvim-lazy/lua/plugins/transparant.lua

88 lines
2.5 KiB
Lua
Raw Normal View History

2024-02-26 08:10:39 +07:00
local transparent = false
local clear_lualine = false
2024-06-14 08:21:36 +07:00
local transparent_mode = pcode.transparent_mode or 0
2024-02-26 08:10:39 +07:00
if transparent_mode ~= nil then
2024-05-24 19:20:23 +07:00
if transparent_mode == 1 then
transparent = true
end
2024-02-26 08:10:39 +07:00
end
2024-05-21 19:49:53 +07:00
local clear_line = vim.g.pcode_clear_lualine or 0
2024-02-26 08:10:39 +07:00
if clear_line ~= nil then
2024-05-24 19:20:23 +07:00
if clear_line == 1 then
clear_lualine = true
end
2024-02-26 08:10:39 +07:00
end
2024-06-03 09:03:01 +07:00
if transparent then
return {
-- transparant config
{
"xiyaowong/transparent.nvim",
lazy = true,
enabled = transparent,
event = "BufWinEnter",
cmd = { "TransparentToggle", "TransparentEnable", "TransparentDisable" },
config = function()
2024-06-14 08:40:35 +07:00
require("transparent").setup({
2024-06-03 09:03:01 +07:00
extra_groups = {
"Normal",
"NormalNC",
"NormalFloat",
"FloatBorder",
"Comment",
"Folded",
"GitSignsAdd",
"GitSignsDelete",
"GitSignsChange",
"FoldColumn",
},
exclude_groups = {
-- disable active selection backgroun
"CursorLine",
"CursorLineNR",
"CursorLineSign",
"CursorLineFold",
-- disable nvimtree CursorLine
"NvimTreeCursorLine",
-- disable Neotree CursorLine
"NeoTreeCursorLine",
-- disable Telescope active selection background
"TelescopeSelection",
-- disable lualine background color
"LualineNormal",
},
2024-06-14 08:40:35 +07:00
})
require("transparent").clear_prefix("BufferLine")
2024-06-03 09:03:01 +07:00
-- clear prefix for which-key
2024-06-14 08:40:35 +07:00
require("transparent").clear_prefix("WhichKey")
2024-06-03 09:03:01 +07:00
-- clear prefix for lazy.nvim
2024-06-14 08:40:35 +07:00
require("transparent").clear_prefix("Lazy")
2024-06-03 09:03:01 +07:00
-- clear prefix for NvimTree
2024-06-14 08:40:35 +07:00
require("transparent").clear_prefix("NvimTree")
2024-06-03 09:03:01 +07:00
-- clear prefix for NeoTree
2024-06-14 08:40:35 +07:00
require("transparent").clear_prefix("NeoTree")
2024-06-03 09:03:01 +07:00
-- clear prefix for Telescope
2024-06-14 08:40:35 +07:00
require("transparent").clear_prefix("Telescope")
require("transparent").clear_prefix("mason")
2024-06-03 09:03:01 +07:00
if clear_lualine then
-- clear prefix for Lualine
2024-06-14 08:40:35 +07:00
require("transparent").clear_prefix("Lualine")
2024-06-03 09:03:01 +07:00
-- create auto command to set transparent
2024-06-14 08:40:35 +07:00
vim.cmd("TransparentDisable")
vim.cmd("TransparentEnable")
2024-06-03 09:03:01 +07:00
end
end,
},
2024-11-04 20:12:32 +07:00
{
"rcarriga/nvim-notify",
opts = function(_, opts)
opts.background_colour = "#00000000"
end,
},
2024-06-03 09:03:01 +07:00
}
else
return {}
end