From f20649b0a41ccc700e41d8a1d402b337a0f75cd4 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 13 Aug 2026 04:31:10 -0700 Subject: [PATCH] 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) --- pkgbuilds/omarchy-nvim/PKGBUILD | 11 +++++++++-- pkgbuilds/omarchy-nvim/lua/plugins/all-themes.lua | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/pkgbuilds/omarchy-nvim/PKGBUILD b/pkgbuilds/omarchy-nvim/PKGBUILD index 50f59e7..d8f6414 100644 --- a/pkgbuilds/omarchy-nvim/PKGBUILD +++ b/pkgbuilds/omarchy-nvim/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Ryan Hughes 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" diff --git a/pkgbuilds/omarchy-nvim/lua/plugins/all-themes.lua b/pkgbuilds/omarchy-nvim/lua/plugins/all-themes.lua index cc459c3..3bbf7a4 100644 --- a/pkgbuilds/omarchy-nvim/lua/plugins/all-themes.lua +++ b/pkgbuilds/omarchy-nvim/lua/plugins/all-themes.lua @@ -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, },