feat(ui): added statusline component to show pending updates

This commit is contained in:
Folke Lemaitre 2022-12-05 20:49:45 +01:00
parent 65cd28e613
commit 315be83afc
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 16 additions and 0 deletions

16
lua/lazy/status.lua Normal file
View File

@ -0,0 +1,16 @@
local Config = require("lazy.core.config")
local M = {}
function M.updates()
local Checker = require("lazy.manage.checker")
local updates = #Checker.updated
return updates > 0 and (Config.options.ui.icons.plugin .. "" .. updates)
end
function M.has_updates()
local Checker = require("lazy.manage.checker")
return #Checker.updated > 0
end
return M