Skip to content

Commit a01bbd6

Browse files
authored
feat(ui): add window.blend option for controllin float transparency (#1227)
Closes #1126 Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
1 parent b124b94 commit a01bbd6

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ Below are all available configuration options with their default values:
468468
title = 'Copilot Chat', -- title of chat window
469469
footer = nil, -- footer of chat window
470470
zindex = 1, -- determines if window is on top or below other floating windows
471+
blend = 0, -- window blend (transparency), 0-100, 0 is opaque, 100 is fully transparent
471472
},
472473

473474
show_help = true, -- Shows help message as virtual lines when waiting for user input

lua/CopilotChat/config.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
---@field title string?
1212
---@field footer string?
1313
---@field zindex number?
14+
---@field blend number?
1415

1516
---@class CopilotChat.config.Shared
1617
---@field system_prompt string?
@@ -81,6 +82,7 @@ return {
8182
title = 'Copilot Chat', -- title of chat window
8283
footer = nil, -- footer of chat window
8384
zindex = 1, -- determines if window is on top or below other floating windows
85+
blend = 0, -- window blend (transparency), 0-100, 0 is opaque, 100 is fully transparent
8486
},
8587

8688
show_help = true, -- Shows help message as virtual lines when waiting for user input

lua/CopilotChat/ui/chat.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ function Chat:open(config)
289289
}
290290

291291
self.winnr = vim.api.nvim_open_win(self.bufnr, false, win_opts)
292+
vim.wo[self.winnr].winblend = window.blend or 0
292293
elseif layout == 'vertical' then
293294
local orig = vim.api.nvim_get_current_win()
294295
local cmd = 'vsplit'

0 commit comments

Comments
 (0)