From e1ffc902e8cc50f0002e0bcdd1b897c6fb0e60a0 Mon Sep 17 00:00:00 2001 From: mvllow Date: Mon, 27 Nov 2023 13:32:00 -0600 Subject: [PATCH] chore: improve float transparency --- lua/rose-pine.lua | 6 +++--- lua/rose-pine/config.lua | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua index 9857a5b..71c5a65 100644 --- a/lua/rose-pine.lua +++ b/lua/rose-pine.lua @@ -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" }, } diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua index 74e7e38..6fc0774 100644 --- a/lua/rose-pine/config.lua +++ b/lua/rose-pine/config.lua @@ -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.