feat: bug fixes, lazy.nvim-style controls, auto-update checking, repo polish

Phase 1 - Bug fixes:
- Fix extmark rendering in text.lua (table vs string hl handling)
- Fix timer leak: WinClosed autocmd now triggers view.close()
- Add GOBIN/GOPATH/~/go/bin awareness to is_installed() and new bin_path()
- Reject update_all() while tasks running (race condition fix)
- Implement _toggle_details with full binary info expansion

Phase 2 - Lazy.nvim-style controls:
- U = Update all, u = update cursor binary
- I = Install all missing, i = install cursor binary
- x = Abort, CR = toggle details, q/Esc = close
- Line-to-binary mapping for cursor-aware actions

Phase 3 - Auto-update checking:
- New checker module with go list/go version -m integration
- auto_check config option (daily/weekly/custom frequency)
- Persistent state in stdpath('data')/glaze/state.json
- :GlazeCheck command for manual checks
- Update indicators in UI (version info + arrows)

Phase 4 - Repo polish:
- MIT LICENSE file
- Doughnut-themed README with badges and Why Glaze? section
- Updated help docs with all new features/keybinds/API
This commit is contained in:
2026-02-19 00:47:19 +00:00
parent 60c2fd8739
commit cd2571d3f2
9 changed files with 674 additions and 48 deletions

View File

@@ -1,16 +1,33 @@
# glaze.nvim 󱓞
# 🍩 glaze.nvim
> A **Mason/Lazy-style** interface for managing Go binaries across Neovim plugins.
> **Go + Lazy = Glaze** — A Mason/Lazy-style manager for Go binaries in Neovim.
> Charmbracelet-inspired aesthetic. Zero duplication. One source of truth.
>
> *Like a fresh doughnut glaze — smooth, sweet, and holds everything together.*
![Lua](https://img.shields.io/badge/Lua-2C2D72?style=flat&logo=lua&logoColor=white)
![Neovim](https://img.shields.io/badge/Neovim%200.9+-57A143?style=flat&logo=neovim&logoColor=white)
![Go Required](https://img.shields.io/badge/Go-required-00ADD8?style=flat&logo=go&logoColor=white)
![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
## 🤔 Why Glaze?
Every Go-based Neovim plugin reinvents the wheel: each one ships its own
`go install` wrapper, its own update command, its own version checking.
**Glaze stops the madness.** Register your binaries once, manage them all from
one beautiful UI. Plugin authors get a two-line integration. Users get a single
`:Glaze` command.
## ✨ Features
- **Centralized binary management** — Register binaries from any plugin, update them all at once
- **Lazy.nvim-style UI** — Floating window with progress bars, spinners, and status indicators
- **Lazy.nvim-style UI** — Floating window with progress bars, spinners, and status indicators
- **Cursor-aware keybinds** — `u` updates the binary under your cursor, `U` updates all
- **Parallel installations** — Configurable concurrency for fast updates
- **Auto-update checking** — Daily/weekly checks with non-intrusive notifications
- **GOBIN/GOPATH awareness** — Finds binaries even if not in PATH
- **Detail expansion** — Press `<CR>` to see URL, install path, version info
- **Charmbracelet aesthetic** — Pink/magenta color scheme that matches the Charm toolchain
- **Zero config for dependents** — Just register and go
- **Callback support** — Get notified when your binary is updated
@@ -51,26 +68,30 @@ glaze.register("mods", "github.com/charmbracelet/mods")
| `:Glaze` | Open the Glaze UI |
| `:GlazeUpdate [name]` | Update all or specific binary |
| `:GlazeInstall [name]` | Install missing or specific binary |
| `:GlazeCheck` | Manually check for available updates |
### Keybinds (in Glaze UI)
| Key | Action |
|-----|--------|
| `u` | Update all binaries |
| `i` | Install missing binaries |
| `U` | Update ALL binaries |
| `u` | Update binary under cursor |
| `I` | Install all missing binaries |
| `i` | Install binary under cursor |
| `x` | Abort running tasks |
| `<CR>` | Toggle details (URL, path, version) |
| `q` / `<Esc>` | Close window |
## 🔌 For Plugin Authors
Register your plugin's binaries as a dependency:
Register your plugin's binaries as a dependency — two lines is all it takes:
```lua
-- In your plugin's setup or init:
local ok, glaze = pcall(require, "glaze")
if ok then
glaze.register("mytool", "github.com/me/mytool", {
plugin = "myplugin.nvim", -- Shows in UI
plugin = "myplugin.nvim",
callback = function(success)
if success then
vim.notify("mytool updated!")
@@ -86,7 +107,6 @@ You can still expose plugin-specific commands that delegate to Glaze:
```lua
vim.api.nvim_create_user_command("MyPluginUpdate", function()
local glaze = require("glaze")
require("glaze.runner").update({ "mytool" })
end, {})
```
@@ -108,6 +128,10 @@ require("glaze").setup({
},
concurrency = 4, -- Max parallel installations
go_cmd = { "go" }, -- Auto-detects goenv if available
auto_check = {
enabled = true, -- Auto-check for updates
frequency = "daily", -- "daily", "weekly", or hours as number
},
})
```
@@ -139,7 +163,8 @@ glaze.unregister(name) -- Remove a binary
glaze.binaries() -- Get all registered binaries
-- Status
glaze.is_installed(name) -- Check if binary exists
glaze.is_installed(name) -- Check if binary exists (PATH + GOBIN + GOPATH)
glaze.bin_path(name) -- Get full path to binary
glaze.status(name) -- "installed", "missing", or "unknown"
-- Runner (for programmatic control)
@@ -152,15 +177,22 @@ runner.abort() -- Stop all tasks
runner.is_running() -- Check if tasks are running
runner.tasks() -- Get current task list
runner.stats() -- Get { total, done, error, running, pending }
-- Update checker
local checker = require("glaze.checker")
checker.check() -- Check for updates (with notifications)
checker.auto_check() -- Check only if enough time has passed
checker.get_update_info() -- Get cached update info
```
## 🤝 Related Projects
- [freeze.nvim](https://github.com/taigrr/freeze.nvim) — Screenshot code with freeze
- [neocrush.nvim](https://github.com/taigrr/neocrush.nvim) — AI-powered coding assistant
- [blast.nvim](https://github.com/taigrr/blast.nvim) — Code activity tracking
- [lazy.nvim](https://github.com/folke/lazy.nvim) — UI inspiration
- [mason.nvim](https://github.com/williamboman/mason.nvim) — Concept inspiration
## 📄 License
MIT
MIT © [Tai Groot](https://github.com/taigrr)