mirror of https://github.com/folke/lazy.nvim.git
feat: config for ui border
This commit is contained in:
parent
fb96183753
commit
0cff878b2e
|
@ -18,6 +18,9 @@ M.defaults = {
|
||||||
packpath = vim.fn.stdpath("data") .. "/site/pack/lazy",
|
packpath = vim.fn.stdpath("data") .. "/site/pack/lazy",
|
||||||
lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json",
|
lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json",
|
||||||
view = {
|
view = {
|
||||||
|
ui = {
|
||||||
|
-- The border to use for the UI window. Accepts same border values as |nvim_open_win()|.
|
||||||
|
border = "none",
|
||||||
icons = {
|
icons = {
|
||||||
start = "",
|
start = "",
|
||||||
plugin = " ",
|
plugin = " ",
|
||||||
|
@ -29,7 +32,6 @@ M.defaults = {
|
||||||
ft = " ",
|
ft = " ",
|
||||||
task = "✔ ",
|
task = "✔ ",
|
||||||
},
|
},
|
||||||
},
|
|
||||||
install_missing = true,
|
install_missing = true,
|
||||||
git = {
|
git = {
|
||||||
-- defaults for `Lazy log`
|
-- defaults for `Lazy log`
|
||||||
|
|
|
@ -53,6 +53,7 @@ function M.show(mode)
|
||||||
local opts = {
|
local opts = {
|
||||||
relative = "editor",
|
relative = "editor",
|
||||||
style = "minimal",
|
style = "minimal",
|
||||||
|
border = Config.options.ui.border,
|
||||||
width = math.min(vim.o.columns - hpad * 2, 200),
|
width = math.min(vim.o.columns - hpad * 2, 200),
|
||||||
height = math.min(vim.o.lines - vpad * 2, 70),
|
height = math.min(vim.o.lines - vpad * 2, 70),
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,7 +237,7 @@ function M:reason(reason, opts)
|
||||||
value = value:match("User (.*)") or value
|
value = value:match("User (.*)") or value
|
||||||
end
|
end
|
||||||
local hl = "LazyLoader" .. key:sub(1, 1):upper() .. key:sub(2)
|
local hl = "LazyLoader" .. key:sub(1, 1):upper() .. key:sub(2)
|
||||||
local icon = Config.options.view.icons[key]
|
local icon = Config.options.ui.icons[key]
|
||||||
if icon then
|
if icon then
|
||||||
self:append(icon .. " ", hl)
|
self:append(icon .. " ", hl)
|
||||||
self:append(value, hl)
|
self:append(value, hl)
|
||||||
|
|
Loading…
Reference in New Issue