From 9049b90d98fe9a698f6e652bd4b647168f12c98a Mon Sep 17 00:00:00 2001 From: Simon McLean Date: Thu, 25 Dec 2025 22:10:52 +0000 Subject: [PATCH 1/2] handle transparent nvim --- lua/triptych/float.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/triptych/float.lua b/lua/triptych/float.lua index 15b3254..32f9200 100644 --- a/lua/triptych/float.lua +++ b/lua/triptych/float.lua @@ -219,6 +219,11 @@ function M.create_three_floating_windows( child = {}, } + -- If nvim is transparent then we don't want to apply winblend because + -- for some reason the effect is reversed + local normal_hl = vim.api.nvim_get_hl and vim.api.nvim_get_hl(0, { name = "Normal" }) + local is_nvim_transparent = normal_hl and normal_hl.bg == nil + -- Build up the configs that will be passed to create_floating_window for i, percentage in ipairs(column_widths) do local is_parent = i == 1 @@ -267,7 +272,7 @@ function M.create_three_floating_windows( role = role, hidden = width == 1, border = border, - transparency = transparency, + transparency = is_nvim_transparent and 0 or transparency, } end From 2ea8a1c1306b964009a8bca2463e82e3a61b840e Mon Sep 17 00:00:00 2001 From: Simon McLean Date: Thu, 25 Dec 2025 22:22:07 +0000 Subject: [PATCH 2/2] fmt --- lua/triptych/float.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/triptych/float.lua b/lua/triptych/float.lua index 32f9200..07e0efd 100644 --- a/lua/triptych/float.lua +++ b/lua/triptych/float.lua @@ -221,7 +221,7 @@ function M.create_three_floating_windows( -- If nvim is transparent then we don't want to apply winblend because -- for some reason the effect is reversed - local normal_hl = vim.api.nvim_get_hl and vim.api.nvim_get_hl(0, { name = "Normal" }) + local normal_hl = vim.api.nvim_get_hl and vim.api.nvim_get_hl(0, { name = 'Normal' }) local is_nvim_transparent = normal_hl and normal_hl.bg == nil -- Build up the configs that will be passed to create_floating_window