Add vimpack: archive-based Neovim plugin manager #1

Merged
benvin merged 2 commits from benvin/initial-plugin into main 2026-09-05 16:22:28 +10:00
Member

Why

Cloning plugins from git ties the editor to GitHub uptime and moving branches; archives at a pinned version from our own registry are reproducible and reachable offline.

How

  • Add a registry resolver interface (spec, registry) -> {url, headers, filename, sha256?} with builtin template (user-supplied ${name}/${version} URL template) and artifactapi kinds, plus a per-plugin registry override and a url escape hatch.
  • Take auth tokens only from an env var or a token_cmd; reject a literal token at setup.
  • Download with curl, verify an optional sha256, extract to a staging dir and rename into stdpath('data')/site/pack/vimpack/{start,opt}/<name>, restoring the previous tree if the swap fails.
  • Track installed name/version/sha256 in stdpath('data')/vimpack/manifest.json and skip plugins already at the wanted version.
  • Add :VimpackInstall, :VimpackUpdate [name], :VimpackClean and :VimpackStatus, running downloads through vim.system under a concurrency cap.
  • Hash with a pure-Lua SHA-256; vim.fn.sha256() rejects binary archives with E976.
  • Add a dependency-free tests/minimal.lua harness and 57 specs covering URL resolution and templating, auth headers, manifest read/write, plan/orphan detection, idempotent skip, checksum mismatch and end-to-end install over file://.
  • Add .woodpecker/{test,lint,pre-commit}.yaml, .luacheckrc, .stylua.toml and pre-commit hooks; README and doc/vimpack.txt document the artifactapi and Artifactory registry shapes.

Note: every CI step sets serviceAccountName: vimpack-ci, which does not yet exist in argocd-apps apps/base/woodpecker/.

## Why Cloning plugins from git ties the editor to GitHub uptime and moving branches; archives at a pinned version from our own registry are reproducible and reachable offline. ## How - Add a registry resolver interface `(spec, registry) -> {url, headers, filename, sha256?}` with builtin `template` (user-supplied `${name}`/`${version}` URL template) and `artifactapi` kinds, plus a per-plugin registry override and a `url` escape hatch. - Take auth tokens only from an env var or a `token_cmd`; reject a literal token at setup. - Download with curl, verify an optional `sha256`, extract to a staging dir and rename into `stdpath('data')/site/pack/vimpack/{start,opt}/<name>`, restoring the previous tree if the swap fails. - Track installed name/version/sha256 in `stdpath('data')/vimpack/manifest.json` and skip plugins already at the wanted version. - Add `:VimpackInstall`, `:VimpackUpdate [name]`, `:VimpackClean` and `:VimpackStatus`, running downloads through `vim.system` under a concurrency cap. - Hash with a pure-Lua SHA-256; `vim.fn.sha256()` rejects binary archives with E976. - Add a dependency-free `tests/minimal.lua` harness and 57 specs covering URL resolution and templating, auth headers, manifest read/write, plan/orphan detection, idempotent skip, checksum mismatch and end-to-end install over `file://`. - Add `.woodpecker/{test,lint,pre-commit}.yaml`, `.luacheckrc`, `.stylua.toml` and pre-commit hooks; README and `doc/vimpack.txt` document the artifactapi and Artifactory registry shapes. Note: every CI step sets `serviceAccountName: vimpack-ci`, which does not yet exist in `argocd-apps` `apps/base/woodpecker/`.
unkin-agent added 1 commit 2026-09-05 13:29:20 +10:00
Add vimpack: archive-based Neovim plugin manager
ci/woodpecker/pr/pre-commit Pipeline failed
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/test Pipeline failed
35b9df9eba
## Why
Cloning plugins from git ties the editor to GitHub uptime and moving branches; archives at a pinned version from our own registry are reproducible and reachable offline.

## How
- Add a registry resolver interface `(spec, registry) -> {url, headers, filename, sha256?}` with builtin `template` and `artifactapi` kinds, a per-plugin registry override and a `url` escape hatch.
- Take auth tokens only from an env var or a `token_cmd`; reject a literal token at setup.
- Download with curl, verify an optional sha256, extract to a staging dir and rename into `pack/vimpack/{start,opt}/<name>`, restoring the previous tree if the swap fails.
- Track installed name/version/sha256 in `stdpath('data')/vimpack/manifest.json` and skip plugins already at the wanted version.
- Add `:VimpackInstall`, `:VimpackUpdate`, `:VimpackClean` and `:VimpackStatus`, running downloads through `vim.system` under a concurrency cap.
- Hash with a pure-Lua SHA-256; `vim.fn.sha256()` rejects binary archives with E976.
- Add a dependency-free `tests/minimal.lua` harness and 57 specs covering resolution, auth, manifest, planning, checksum mismatch, orphan detection and end-to-end install.
- Add `.woodpecker/{test,lint,pre-commit}.yaml`, luacheck/stylua config and pre-commit hooks.
unkin-agent added 1 commit 2026-09-05 13:30:19 +10:00
Run CI under the default service account
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ac7d086623
The vimpack-ci ServiceAccount does not exist in argocd-apps, so every step
failed at pod creation. Other non-Go repos in the estate use default.
benvin merged commit ae951a9ea6 into main 2026-09-05 16:22:28 +10:00
benvin deleted branch benvin/initial-plugin 2026-09-05 16:22:28 +10:00
Sign in to join this conversation.