fix(nvim): better validate when updates are available in lazy
Some checks failed
Check Formatting of Files / Check-Formatting (push) Has been cancelled

This commit is contained in:
Price Hiller 2024-09-25 15:27:26 -05:00
parent 8ffa964ee7
commit 3cbb3faa5b
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -87,10 +87,11 @@ return {
}
vim.api.nvim_set_hl(0, "AlphaPluginUpdate", { link = "@string" })
local lstatus = require("lazy.status")
local plugin_info = {
type = "text",
val = function()
if require("lazy.status").has_updates() then
if lstatus.has_updates() and lstatus.updates() then
vim.api.nvim_set_hl(0, "AlphaPluginUpdate", { link = "@keyword.return" })
return "Plugin updates available!"
else