Skip to content

Commit

Permalink
refactor(transparent-nvim): Replace opts table with config (#639)
Browse files Browse the repository at this point in the history
refactor(transparent-nvim): optimize usage

Added processing of BufferLine, lualine
  • Loading branch information
xiyaowong authored Nov 13, 2023
1 parent 8ea7c89 commit 44ecec4
Showing 1 changed file with 12 additions and 38 deletions.
50 changes: 12 additions & 38 deletions lua/astrocommunity/color/transparent-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,18 @@ local prefix = "<leader>u"
return {
"xiyaowong/transparent.nvim",
lazy = false,
opts = {
-- table: default groups
groups = {
"Normal",
"NormalNC",
"Comment",
"Constant",
"Special",
"Identifier",
"Statement",
"PreProc",
"Type",
"Underlined",
"Todo",
"String",
"Function",
"Conditional",
"Repeat",
"Operator",
"Structure",
"LineNr",
"NonText",
"SignColumn",
"CursorLineNr",
"CursorLine",
"EndOfBuffer",
},
-- table: additional groups that should be cleared
extra_groups = {
"NormalFloat",
"NvimTreeNormal",
"NeoTreeNormal",
"NeoTreeFloatBorder",
"NeoTreeNormalNC",
},
-- table: groups you don't want to clear
exclude_groups = {},
},
config = function()
local transparent = require "transparent"
transparent.setup {
extra_groups = {
"NormalFloat",
"NvimTreeNormal",
},
}
transparent.clear_prefix "BufferLine"
transparent.clear_prefix "NeoTree"
transparent.clear_prefix "lualine"
end,
keys = {
{ prefix .. "T", "<cmd>TransparentToggle<CR>", desc = "Toggle transparency" },
},
Expand Down

0 comments on commit 44ecec4

Please sign in to comment.