mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-18 20:36:45 +00:00
feat(ui): show new version that is available instead of general message
This commit is contained in:
parent
a9de5910f2
commit
34e2c78e06
6 changed files with 20 additions and 11 deletions
|
@ -19,11 +19,11 @@ function M.fast_check(opts)
|
|||
opts = opts or {}
|
||||
for _, plugin in pairs(Config.plugins) do
|
||||
if not plugin.pin and plugin._.installed then
|
||||
plugin._.has_updates = nil
|
||||
plugin._.updates = nil
|
||||
local info = Git.info(plugin.dir)
|
||||
local ok, target = pcall(Git.get_target, plugin)
|
||||
if ok and info and target and info.commit ~= target.commit then
|
||||
plugin._.has_updates = true
|
||||
plugin._.updates = { from = info, to = target }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -45,7 +45,7 @@ function M.report(notify)
|
|||
local lines = {}
|
||||
M.updated = {}
|
||||
for _, plugin in pairs(Config.plugins) do
|
||||
if plugin._.has_updates then
|
||||
if plugin._.updates then
|
||||
table.insert(M.updated, plugin.name)
|
||||
if not vim.tbl_contains(M.reported, plugin.name) then
|
||||
table.insert(lines, "- **" .. plugin.name .. "**")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue