chore: improve float transparency

This commit is contained in:
mvllow 2023-11-27 13:32:00 -06:00
commit e1ffc902e8
No known key found for this signature in database
2 changed files with 9 additions and 6 deletions

View file

@ -470,7 +470,7 @@ local function set_highlights()
-- nvim-telescope/telescope.nvim
TelescopeBorder = make_border(),
TelescopeMatching = { fg = palette.rose },
TelescopeNormal = { bg = groups.panel },
TelescopeNormal = { link = "NormalFloat" },
TelescopePromptNormal = { link = "TelescopeNormal" },
TelescopePromptPrefix = { fg = palette.subtle },
TelescopeSelection = { fg = palette.text, bg = palette.overlay },
@ -587,10 +587,10 @@ local function set_highlights()
TabLineFill = { bg = "NONE" },
TabLineSel = { fg = palette.text, bg = "NONE", bold = styles.bold },
TelescopeNormal = { fg = palette.text, bg = "NONE" },
TelescopeNormal = { fg = palette.subtle, bg = "NONE" },
TelescopePromptNormal = { fg = palette.text, bg = "NONE" },
TelescopeSelection = { fg = palette.text, bg = "NONE", bold = styles.bold },
TelescopeSelectionCaret = { fg = palette.rose, bg = "NONE" },
TelescopeSelectionCaret = { fg = palette.rose, bg = palette.rose },
WhichKeyFloat = { bg = "NONE" },
}

View file

@ -88,7 +88,7 @@ config.options = {
-- dim_nc_background = false,
---@deprecated Replaced by `options.enable.transparency`
-- disable_background = false,
---@deprecated Replaced by `options.enable.transparency`
---@deprecated Replaced by `options.highlight_groups["NormalFloat"]`
-- disable_float_background = false,
---@deprecated Replaced by `options.styles.italic`
-- disable_italics = false,
@ -101,6 +101,10 @@ local function migrate(options)
options.highlight_groups["VertSplit"] = { fg = "muted", bg = "muted" }
end
if options.disable_float_background then
options.highlight_groups["NormalFloat"] = { bg = "NONE" }
end
options.dim_inactive_windows = options.dim_nc_background or options.dim_inactive_windows
if options.groups.background ~= nil then
@ -115,8 +119,7 @@ local function migrate(options)
options.highlight_groups["@punctuation"] = { fg = options.groups.punctuation }
end
options.styles.transparency = (options.disable_background or options.disable_float_background)
or options.styles.transparency
options.styles.transparency = options.disable_background or options.styles.transparency
-- These never actually existed, but may be set intuitively by the user
-- because of `disable_italics` existing.