238 lines · 5.8 KB
---@brief [[
--- glaze.nvim - Centralized Go binary management for Neovim plugins
---
--- A Mason/Lazy-style interface for managing Go binaries across multiple plugins.
--- Register your plugin's binaries once, update them all with a single command.
---
--- Usage:
---   require("glaze").setup({})
---   require("glaze").register("freeze", "github.com/charmbracelet/freeze")
---   require("glaze").register("glow", "github.com/charmbracelet/glow")
---@brief ]]

local M = {}

---@class GlazeBinary
---@field name string Binary name (executable name)
---@field url string Go module URL (without @version)
---@field plugin? string Plugin that registered this binary
---@field callback? fun(success: boolean) Optional callback after install/update

---@class GlazeAutoCheckConfig
---@field enabled boolean Whether to auto-check for updates
---@field frequency string|number Frequency: "daily", "weekly", or hours as number

---@class GlazeConfig
---@field ui GlazeUIConfig
---@field concurrency number Max parallel installations
---@field go_cmd string[] Go command (supports goenv)
---@field auto_check GlazeAutoCheckConfig

---@class GlazeUIConfig
---@field border string Border style
---@field size { width: number, height: number }
---@field icons GlazeIcons

---@class GlazeIcons
---@field pending string
---@field running string
---@field done string
---@field error string