mirror of
https://github.com/taigrr/glaze.nvim.git
synced 2026-04-02 03:09:10 -07:00
Compare commits
2 Commits
v1.0.1
...
cd/bugfixe
| Author | SHA1 | Date | |
|---|---|---|---|
| 67255b346c | |||
| 93acbc55c5 |
@@ -203,12 +203,9 @@ function M.check(opts)
|
|||||||
end
|
end
|
||||||
|
|
||||||
M._checking = true
|
M._checking = true
|
||||||
local remaining = 0
|
|
||||||
local updates_found = 0
|
local updates_found = 0
|
||||||
|
local remaining = vim.tbl_count(binaries)
|
||||||
for name, _ in pairs(binaries) do
|
for name, binary in pairs(binaries) do
|
||||||
remaining = remaining + 2 -- installed version + latest version
|
|
||||||
|
|
||||||
local info = {
|
local info = {
|
||||||
name = name,
|
name = name,
|
||||||
installed_version = nil,
|
installed_version = nil,
|
||||||
@@ -217,16 +214,6 @@ function M.check(opts)
|
|||||||
}
|
}
|
||||||
M._update_info[name] = info
|
M._update_info[name] = info
|
||||||
|
|
||||||
get_installed_version(name, function()
|
|
||||||
-- callback receives version from the jobstart; re-check via closure
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Simplified: check each binary sequentially-ish
|
|
||||||
remaining = vim.tbl_count(binaries)
|
|
||||||
for name, binary in pairs(binaries) do
|
|
||||||
local info = M._update_info[name]
|
|
||||||
|
|
||||||
get_installed_version(name, function(installed)
|
get_installed_version(name, function(installed)
|
||||||
info.installed_version = installed
|
info.installed_version = installed
|
||||||
|
|
||||||
|
|||||||
@@ -72,10 +72,13 @@ function M.check()
|
|||||||
else
|
else
|
||||||
vim.health.ok(count .. " binary(ies) registered")
|
vim.health.ok(count .. " binary(ies) registered")
|
||||||
for name, binary in pairs(binaries) do
|
for name, binary in pairs(binaries) do
|
||||||
|
local pi = (binary.plugins and #binary.plugins > 0)
|
||||||
|
and (" (" .. table.concat(binary.plugins, ", ") .. ")")
|
||||||
|
or ""
|
||||||
if glaze.is_installed(name) then
|
if glaze.is_installed(name) then
|
||||||
vim.health.ok(" " .. name .. " — installed" .. (binary.plugin and (" (" .. binary.plugin .. ")") or ""))
|
vim.health.ok(" " .. name .. " — installed" .. pi)
|
||||||
else
|
else
|
||||||
vim.health.warn(" " .. name .. " — missing" .. (binary.plugin and (" (" .. binary.plugin .. ")") or ""), {
|
vim.health.warn(" " .. name .. " — missing" .. pi, {
|
||||||
"Run :GlazeInstall " .. name,
|
"Run :GlazeInstall " .. name,
|
||||||
"Or: go install " .. binary.url .. "@latest",
|
"Or: go install " .. binary.url .. "@latest",
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -164,16 +164,16 @@ function M.render()
|
|||||||
text:append(" ", nil, { indent = 2 })
|
text:append(" ", nil, { indent = 2 })
|
||||||
text:append(" U ", "GlazeButtonActive"):append(" Update All ", "GlazeButton")
|
text:append(" U ", "GlazeButtonActive"):append(" Update All ", "GlazeButton")
|
||||||
text:append(" ")
|
text:append(" ")
|
||||||
text:append(" u ", "GlazeButtonActive"):append(" Update ", "GlazeButton")
|
text:append(" u ", "GlazeButtonActive"):append(" Update Selected ", "GlazeButton")
|
||||||
text:append(" ")
|
text:append(" ")
|
||||||
text:append(" I ", "GlazeButtonActive"):append(" Install All ", "GlazeButton")
|
text:append(" I ", "GlazeButtonActive"):append(" Install All ", "GlazeButton")
|
||||||
text:append(" ")
|
text:append(" ")
|
||||||
text:append(" i ", "GlazeButtonActive"):append(" Install ", "GlazeButton")
|
text:append(" i ", "GlazeButtonActive"):append(" Install Selected ", "GlazeButton")
|
||||||
text:nl()
|
text:nl()
|
||||||
text:append(" ", nil, { indent = 2 })
|
text:append(" ", nil, { indent = 2 })
|
||||||
text:append(" x ", "GlazeButtonActive"):append(" Abort ", "GlazeButton")
|
text:append(" x ", "GlazeButtonActive"):append(" Abort ", "GlazeButton")
|
||||||
text:append(" ")
|
text:append(" ")
|
||||||
text:append(" ⏎ ", "GlazeButtonActive"):append(" Details ", "GlazeButton")
|
text:append(" <enter> ", "GlazeButtonActive"):append(" Details ", "GlazeButton")
|
||||||
text:append(" ")
|
text:append(" ")
|
||||||
text:append(" q ", "GlazeButtonActive"):append(" Close ", "GlazeButton")
|
text:append(" q ", "GlazeButtonActive"):append(" Close ", "GlazeButton")
|
||||||
text:nl():nl()
|
text:nl():nl()
|
||||||
|
|||||||
Reference in New Issue
Block a user