Add vimpack: archive-based Neovim plugin manager #1
Reference in New Issue
Block a user
Delete Branch "benvin/initial-plugin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
(spec, registry) -> {url, headers, filename, sha256?}with builtintemplate(user-supplied${name}/${version}URL template) andartifactapikinds, plus a per-plugin registry override and aurlescape hatch.token_cmd; reject a literal token at setup.sha256, extract to a staging dir and rename intostdpath('data')/site/pack/vimpack/{start,opt}/<name>, restoring the previous tree if the swap fails.stdpath('data')/vimpack/manifest.jsonand skip plugins already at the wanted version.:VimpackInstall,:VimpackUpdate [name],:VimpackCleanand:VimpackStatus, running downloads throughvim.systemunder a concurrency cap.vim.fn.sha256()rejects binary archives with E976.tests/minimal.luaharness 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 overfile://..woodpecker/{test,lint,pre-commit}.yaml,.luacheckrc,.stylua.tomland pre-commit hooks; README anddoc/vimpack.txtdocument the artifactapi and Artifactory registry shapes.Note: every CI step sets
serviceAccountName: vimpack-ci, which does not yet exist inargocd-appsapps/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` 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.