Skip to content

Commit d8da4ef

Browse files
A-Lamiamehalter
authored andcommitted
feat(spotlight): update spotlight to work with transparency
1 parent 0ccec22 commit d8da4ef

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

lua/astrotheme/groups/plugins/spotlight.lua

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
local function callback(opts)
2+
local bg = (opts.float and C.ui.base) or (opts.transparent and C.none) or C.ui.base
3+
local blend = vim.o.winblend or 0
4+
25
return {
36
SpotlightTitle = {
4-
fg = (opts.title_invert and C.ui.tool) or C.ui.title,
5-
bg = (opts.title_invert and C.ui.title)
6-
-- or (opts.transparent and C.none)
7-
or C.ui.base,
7+
fg = (opts.title_invert and C.ui.base) or C.ui.title,
8+
bg = (opts.title_invert and C.ui.title) or (opts.transparent and C.none) or C.ui.base,
89
blend = opts.title_invert and 0 or vim.o.winblend or 0,
910
bold = true,
1011
},
1112
SpotlightBorder = {
12-
fg = C.ui.base,
13-
bg = C.ui.base,
14-
blend = vim.o.winblend or 0,
13+
fg = opts.border and C.ui.border or C.ui.base,
14+
bg = bg,
15+
blend = blend,
1516
},
1617
SpotlightNormal = {
1718
fg = C.ui.text,
18-
bg = C.ui.base,
19-
blend = vim.o.winblend or 0,
19+
bg = bg,
20+
blend = blend,
2021
},
2122
SpotlightWinSeparator = {
22-
fg = C.ui.tabline,
23-
bg = C.ui.tabline,
24-
blend = vim.o.winblend or 0,
23+
fg = C.ui.inactive_base,
24+
bg = opts.transparent and C.none or C.ui.inactive_base,
25+
blend = blend,
2526
},
2627
SpotlightNormalNC = {
27-
fg = C.ui.tabline,
28-
bg = C.ui.tabline,
29-
blend = vim.o.winblend or 0,
28+
fg = C.ui.inactive_base,
29+
bg = opts.transparent and C.none or C.ui.inactive_base,
30+
-- blend = blend,
3031
},
3132
}
3233
end

0 commit comments

Comments
 (0)