Skip to content

Commit 830ef7d

Browse files
committed
Gruvbox.config: add transparent_floats option
Now, `NormalFloat` only gets `bg = nil` if both `transparent_mode` and `transparent_floats` are enabled
1 parent dfc89cf commit 830ef7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/gruvbox.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ local Gruvbox = {}
4242
---@field strikethrough boolean?
4343
---@field terminal_colors boolean?
4444
---@field transparent_mode boolean?
45+
---@field transparent_floats boolean?
4546
---@field undercurl boolean?
4647
---@field underline boolean?
4748
Gruvbox.config = {
@@ -66,6 +67,7 @@ Gruvbox.config = {
6667
overrides = {},
6768
dim_inactive = false,
6869
transparent_mode = false,
70+
transparent_floats = false,
6971
}
7072

7173
-- main gruvbox color palette
@@ -286,7 +288,8 @@ local function get_groups()
286288
GruvboxAquaUnderline = { undercurl = config.undercurl, sp = colors.aqua },
287289
GruvboxOrangeUnderline = { undercurl = config.undercurl, sp = colors.orange },
288290
Normal = config.transparent_mode and { fg = colors.fg1, bg = nil } or { fg = colors.fg1, bg = colors.bg0 },
289-
NormalFloat = config.transparent_mode and { fg = colors.fg1, bg = nil } or { fg = colors.fg1, bg = colors.bg1 },
291+
NormalFloat = (config.transparent_mode and config.transparent_floats) and { fg = colors.fg1, bg = nil }
292+
or { fg = colors.fg1, bg = colors.bg1 },
290293
NormalNC = config.dim_inactive and { fg = colors.fg0, bg = colors.bg1 } or { link = "Normal" },
291294
CursorLine = { bg = colors.bg1 },
292295
CursorColumn = { link = "CursorLine" },

0 commit comments

Comments
 (0)