Skip to content

Commit

Permalink
add winblend ui option
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon McLean committed Nov 13, 2024
1 parent 7967abe commit 5df6d0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
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

0 comments on commit 5df6d0b

Please sign in to comment.