mirror of https://github.com/folke/lazy.nvim.git
feat(ui): added statusline component to show pending updates
This commit is contained in:
parent
65cd28e613
commit
315be83afc
|
@ -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
|
Loading…
Reference in New Issue