Skip to content

Commit 0cff878

Browse files
committed
feat: config for ui border
1 parent fb96183 commit 0cff878

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

lua/lazy/core/config.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ M.defaults = {
1818
packpath = vim.fn.stdpath("data") .. "/site/pack/lazy",
1919
lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json",
2020
view = {
21+
ui = {
22+
-- The border to use for the UI window. Accepts same border values as |nvim_open_win()|.
23+
border = "none",
2124
icons = {
2225
start = "",
2326
plugin = "",
@@ -26,10 +29,9 @@ M.defaults = {
2629
event = "",
2730
keys = "",
2831
cmd = "",
29-
ft = "",
32+
ft = " ",
3033
task = "",
3134
},
32-
},
3335
install_missing = true,
3436
git = {
3537
-- defaults for `Lazy log`

lua/lazy/view/init.lua

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function M.show(mode)
5353
local opts = {
5454
relative = "editor",
5555
style = "minimal",
56+
border = Config.options.ui.border,
5657
width = math.min(vim.o.columns - hpad * 2, 200),
5758
height = math.min(vim.o.lines - vpad * 2, 70),
5859
}

lua/lazy/view/render.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ function M:reason(reason, opts)
237237
value = value:match("User (.*)") or value
238238
end
239239
local hl = "LazyLoader" .. key:sub(1, 1):upper() .. key:sub(2)
240-
local icon = Config.options.view.icons[key]
240+
local icon = Config.options.ui.icons[key]
241241
if icon then
242242
self:append(icon .. " ", hl)
243243
self:append(value, hl)

0 commit comments

Comments
 (0)