feat(ui): added support for setting a title of the lazy window. Fixes #814

This commit is contained in:
Folke Lemaitre 2023-05-27 14:28:09 +02:00
parent 97c2f8858c
commit 9dce0816f1
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 15 additions and 3 deletions

View file

@ -9,6 +9,8 @@ local ViewConfig = require("lazy.view.config")
---@field zindex? number
---@field style? "" | "minimal"
---@field border? "none" | "single" | "double" | "rounded" | "solid" | "shadow"
---@field title? string
---@field title_pos? "center" | "left" | "right"
---@class LazyFloat
---@field buf number
@ -50,6 +52,8 @@ function M:init(opts)
border = self.opts.border,
zindex = self.opts.zindex,
noautocmd = true,
title = self.opts.title,
title_pos = self.opts.title and self.opts.title_pos or nil,
}
self:mount()
self:on_key(ViewConfig.keys.close, self.close)