Skip to content

feat(ui): winblend option #1815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lua/lazy/core/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ M.defaults = {
border = "none",
-- The backdrop opacity. 0 is fully opaque, 100 is fully transparent.
backdrop = 60,
-- The main window opacity. 0 is fully opaque, 100 is fully transparent.
winblend = 0,
title = nil, ---@type string only works when border is not "none"
title_pos = "center", ---@type "center" | "left" | "right"
-- Show pills on top of the Lazy window
Expand Down
3 changes: 3 additions & 0 deletions lua/lazy/view/float.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ local ViewConfig = require("lazy.view.config")
---@field ft? string
---@field noautocmd? boolean
---@field backdrop? float
---@field winblend? number

---@class LazyFloat
---@field buf number
Expand Down Expand Up @@ -55,6 +56,7 @@ function M:init(opts)
style = "minimal",
border = Config.options.ui.border or "none",
backdrop = Config.options.ui.backdrop or 60,
winblend = Config.options.ui.winblend or 0,
zindex = 50,
}, opts or {})

Expand Down Expand Up @@ -184,6 +186,7 @@ function M:mount()
Util.wo(self.win, "wrap", true)
Util.wo(self.win, "winhighlight", "Normal:LazyNormal")
Util.wo(self.win, "colorcolumn", "")
Util.wo(self.win, "winblend", self.opts.winblend)
end
opts()

Expand Down
Loading