Ship the aether plugin cache under the name Omarchy 4 asks for

Omarchy 4 generates most theme specs from default/themed/neovim.lua.tpl on
top of aether, pinned as `name = "aether", branch = "v3"`. lazy indexes
specs by url and lets an explicit name rename the merged plugin, so the
bare "bjarneo/aether.nvim" entry here built the cache into lazy/aether.nvim
while every aether-themed install renamed that same plugin to lazy/aether at
runtime -- a directory the package never shipped. Picking one of those themes
on a fresh install cloned aether over the network at first launch and left
the session on tokyonight until nvim was restarted. Six stock Omarchy 4
themes route through the template, plus last-horizon.

Naming the entry to match builds the cache into lazy/aether directly. There
is still only one clone: Omarchy 3.8's hackerman theme depends on the bare
"bjarneo/aether.nvim" url, which merges into the same plugin, so 3.8 keeps
resolving offline as before.

Also keep refs/remotes/origin/HEAD when slimming. It pins no objects, but
lazy.nvim resolves the default branch through it for plugins parked on a
detached HEAD by a version pin -- lazy.nvim, LazyVim and blink.cmp. Without
it get_branch() returns nil and every lockfile write asserts, so :Lazy
install/update/sync died with E5113 on a fresh install, taking out the usual
self-heal path too. Regression from 45ca871.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
David Heinemeier Hansson
2026-08-13 04:31:10 -07:00
co-authored by Claude Opus 5
parent 3d3ace990b
commit f20649b0a4
2 changed files with 23 additions and 2 deletions
+9 -2
View File
@@ -1,6 +1,6 @@
# Maintainer: Ryan Hughes <ryan@omarchy.org>
pkgname=omarchy-nvim
pkgver=2026.8.1
pkgver=2026.8.13
pkgrel=1
pkgdesc="Pre-built LazyVim configuration with cached plugins"
arch=('any')
@@ -61,9 +61,16 @@ slim_lazy_repos() {
# is half the package -- ~70 MB of .git across the plugins. `git fetch`
# into a shallow repo stays shallow and re-fetches tags, so :Lazy update
# still works.
git -C "$dir" symbolic-ref -d refs/remotes/origin/HEAD 2>/dev/null || true
#
# Keep refs/remotes/origin/HEAD. It pins no objects (it is a symref, and
# stays readable after its target ref is gone), but lazy.nvim resolves the
# default branch through it for plugins parked on a detached HEAD by a
# version pin -- lazy.nvim, LazyVim and blink.cmp. Without it, get_branch()
# returns nil and every lockfile write asserts, so :Lazy install/update/sync
# dies with E5113 on a fresh install.
git -C "$dir" for-each-ref --format='%(refname)' refs/remotes refs/tags |
while IFS= read -r ref; do
[[ $ref == refs/remotes/origin/HEAD ]] && continue
git -C "$dir" update-ref -d "$ref"
done
rm -f "$dir/.git/FETCH_HEAD" "$dir/.git/ORIG_HEAD"
@@ -1,13 +1,27 @@
return {
-- Load all theme plugins but don't apply them
-- This ensures all colorschemes are available for hot-reloading
--
-- Omarchy 4 generates most theme specs from default/themed/neovim.lua.tpl on
-- top of aether, so the single-theme plugins below (ethereal, vantablack,
-- white, monokai-pro, miasma) are only reached by Omarchy 3.8, which ships a
-- neovim.lua per theme. Keep them until 3.8 is out of support.
{
"ribru17/bamboo.nvim",
lazy = true,
priority = 1000,
},
-- Name and branch must match Omarchy 4's generated theme spec
-- (default/themed/neovim.lua.tpl). lazy merges specs by url and lets an
-- explicit name rename the merged plugin, so a bare "bjarneo/aether.nvim"
-- here builds the cache into lazy/aether.nvim while every aether-themed
-- Omarchy 4 install renames it to lazy/aether at runtime -- a directory the
-- package never shipped. That cost a network clone on first launch, and the
-- theme fell back to tokyonight until nvim was restarted.
{
"bjarneo/aether.nvim",
branch = "v3",
name = "aether",
lazy = true,
priority = 1000,
},