From 67255b346c49f9e9b761afbe1e9395c06e6a9270 Mon Sep 17 00:00:00 2001 From: Tai Groot Date: Mon, 2 Mar 2026 09:03:05 +0000 Subject: [PATCH] fix(health,checker): fix plugin display bug and remove redundant version checks - health.lua: referenced non-existent binary.plugin field instead of binary.plugins array, causing plugin names to never display in :checkhealth output - checker.lua: removed redundant first loop in check() that called get_installed_version without using the result, and eliminated dead remaining counter that was immediately overwritten --- lua/glaze/checker.lua | 17 ++--------------- lua/glaze/health.lua | 7 +++++-- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/lua/glaze/checker.lua b/lua/glaze/checker.lua index 3258ba7..071bcdf 100644 --- a/lua/glaze/checker.lua +++ b/lua/glaze/checker.lua @@ -203,12 +203,9 @@ function M.check(opts) end M._checking = true - local remaining = 0 local updates_found = 0 - - for name, _ in pairs(binaries) do - remaining = remaining + 2 -- installed version + latest version - + local remaining = vim.tbl_count(binaries) + for name, binary in pairs(binaries) do local info = { name = name, installed_version = nil, @@ -217,16 +214,6 @@ function M.check(opts) } 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) info.installed_version = installed diff --git a/lua/glaze/health.lua b/lua/glaze/health.lua index 6b489ab..1123906 100644 --- a/lua/glaze/health.lua +++ b/lua/glaze/health.lua @@ -72,10 +72,13 @@ function M.check() else vim.health.ok(count .. " binary(ies) registered") 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 - vim.health.ok(" " .. name .. " — installed" .. (binary.plugin and (" (" .. binary.plugin .. ")") or "")) + vim.health.ok(" " .. name .. " — installed" .. pi) else - vim.health.warn(" " .. name .. " — missing" .. (binary.plugin and (" (" .. binary.plugin .. ")") or ""), { + vim.health.warn(" " .. name .. " — missing" .. pi, { "Run :GlazeInstall " .. name, "Or: go install " .. binary.url .. "@latest", })