mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-24 09:48:51 +02:00
add: transparant config for all theme
This commit is contained in:
parent
27ffa22293
commit
ff2b881ef8
6 changed files with 65 additions and 25 deletions
|
@ -118,7 +118,7 @@ return {
|
|||
"MasonUninstallAll",
|
||||
"MasonLog",
|
||||
},
|
||||
keys = { { "<leader>cm", "<cmd>Mason<cr>", desc = "Mason" } },
|
||||
-- keys = { { "<leader>cm", "<cmd>Mason<cr>", desc = "Mason" } },
|
||||
config = function()
|
||||
require("user.lsp")
|
||||
end,
|
||||
|
@ -182,7 +182,8 @@ return {
|
|||
{
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
lazy = true,
|
||||
event = "BufWinEnter",
|
||||
-- event = "BufWinEnter",
|
||||
event = "InsertEnter",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require("ts_context_commentstring").setup({
|
||||
|
@ -192,7 +193,8 @@ return {
|
|||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "BufWinEnter",
|
||||
-- event = "BufWinEnter",
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("user.comment")
|
||||
end,
|
||||
|
@ -253,7 +255,8 @@ return {
|
|||
-- for auto close tag
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
event = "BufWinEnter",
|
||||
-- event = "BufWinEnter",
|
||||
event = "BufRead",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require("nvim-ts-autotag").setup()
|
||||
|
|
63
lua/plugins/transparant.lua
Normal file
63
lua/plugins/transparant.lua
Normal file
|
@ -0,0 +1,63 @@
|
|||
local transparent = false
|
||||
local clear_lualine = false
|
||||
local data_exists, config = pcall(require, "core.config")
|
||||
if not data_exists then
|
||||
return
|
||||
end
|
||||
|
||||
local transparent_mode = config.transparent_mode
|
||||
if transparent_mode ~= nil then
|
||||
if transparent_mode == 1 then
|
||||
transparent = true
|
||||
end
|
||||
end
|
||||
|
||||
local clear_line = config.clear_lualine
|
||||
if clear_line ~= nil then
|
||||
if clear_line == 1 then
|
||||
clear_lualine = true
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
-- transparant config
|
||||
{
|
||||
"xiyaowong/transparent.nvim",
|
||||
enabled = transparent,
|
||||
event = "BufWinEnter",
|
||||
cmd = { "TransparentToggle", "TransparentEnable", "TransparentDisable" },
|
||||
config = function()
|
||||
require("transparent").setup({
|
||||
extra_groups = {},
|
||||
exclude_groups = {
|
||||
-- disable active selection backgroun
|
||||
"CursorLine",
|
||||
"CursorLineNR",
|
||||
"CursorLineSign",
|
||||
"CursorLineFold",
|
||||
-- disable nvimtree CursorLine
|
||||
"NvimTreeCursorLine",
|
||||
-- disable Neotree CursorLine
|
||||
"NeoTreeCursorLine",
|
||||
},
|
||||
})
|
||||
require("transparent").clear_prefix("BufferLine")
|
||||
-- clear prefix for which-key
|
||||
require("transparent").clear_prefix("WhichKey")
|
||||
-- clear prefix for lazy.nvim
|
||||
require("transparent").clear_prefix("Lazy")
|
||||
-- clear prefix for NvimTree
|
||||
require("transparent").clear_prefix("NvimTree")
|
||||
-- clear prefix for NeoTree
|
||||
require("transparent").clear_prefix("NeoTree")
|
||||
if clear_lualine then
|
||||
-- clear prefix for Lualine
|
||||
require("transparent").clear_prefix("Lualine")
|
||||
end
|
||||
-- clear prefix for Telescope
|
||||
require("transparent").clear_prefix("Telescope")
|
||||
-- create auto command to set transparent
|
||||
vim.cmd("TransparentEnable")
|
||||
end,
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue