Fix Neovim erroring with "could not load your colorscheme" after a theme change
Checked on this workstation at omarchy 4.0.2-1, omarchy-nvim 2026.8.13-1, neovim 0.12.5-1. The record's mechanism is wrong: omarchy-theme-set does not copy a neovim.lua into the nvim config, it rebuilds ~/.local/state/omarchy/current/theme/ and ~/.config/nvim/lua/plugins/theme.lua is a symlink into that directory, shipped as a symlink by omarchy-nvim in /etc/skel/.config/nvim/lua/plugins/theme.lua and confirmed unaltered by pacman -Qkk omarchy-nvim. That makes the record's last fix step actively harmful, because it tells the reader to edit a file that omarchy-theme-set deletes with rm -rf "$CURRENT_THEME_PATH" on the next theme change. The cause's claim that "Omarchy ships no lazy-lock.json" is false on Omarchy 4: pacman -Ql omarchy-nvim lists /etc/skel/.config/nvim/lazy-lock.json, the reference copy is /usr/share/omarchy-nvim/config/lazy-lock.json, and its catppuccin pin edefef779ab08ce1a4a404713e3012b0d202bd35 already registers catppuccin-nvim, verified by listing ~/.local/share/nvim/lazy/catppuccin/colors/ on this machine. That sentence was copied verbatim from the cited issue comment, which I read in full at https://github.com/omacom/omarchy/issues/6648: the comment is otherwise correct and the rename claim holds, since catppuccin/nvim PR #977 merged 2026-03-13 and shipped in v2.0.0 on 2026-04-02, and Neovim 0.12.5 does carry /usr/share/nvim/runtime/colors/catppuccin.vim. The error string is LazyVim's, from lua/lazyvim/config/init.lua, and it falls back to habamax rather than to an unthemed editor, so the symptom was rewritten too. The fix now covers the case the record missed entirely: 7 of the 22 shipped themes carry no neovim.lua, and omarchy-theme-set drops every *.lua from a theme cloned by omarchy theme install, so both get a spec generated from $OMARCHY_PATH/default/themed/neovim.lua.tpl asking for aether, which is what a lock older than that template lacks. Frequency lowered to occasional because the shipped lock now carries the post-rename catppuccin pin, so a current install does not reproduce the catppuccin case and only a drifted or pre-aether lock does. NOT exercised: I changed no theme, installed no third-party theme and did not start Neovim, so every claim here comes from reading the scripts, the package file list, the on-disk plugin checkouts and the cited sources rather than from reproducing the failure.
:Lazy restore and :Lazy sync move every plugin, not only the colorscheme, and rewrite ~/.config/nvim/lazy-lock.json. Copy the lock aside first, as the fix does, and commit it if you version your dotfiles. Do not edit ~/.config/nvim/lua/plugins/theme.lua: it is a symlink into ~/.local/state/omarchy/current/theme/, which omarchy-theme-set removes with rm -rf on the next theme change, so the edit is lost and the staged theme carries your override until then.
Symptom
After a theme change, every nvim launch shows LazyVim's Could not load your colorscheme error and the editor opens in Neovim's builtin habamax with none of the theme's colours.
Cause
Omarchy 4 ships its own Neovim config as the omarchy-nvim package (2026.8.13-1 here), seeded from /etc/skel/.config/nvim when the account is created, with the reference copy kept at /usr/share/omarchy-nvim/config. It is LazyVim, and ~/.config/nvim/lua/plugins/theme.lua is a **symlink** to ~/.local/state/omarchy/current/theme/neovim.lua, not a copy:
lrwxrwxrwx theme.lua -> ../../../../.local/state/omarchy/current/theme/neovim.lua
omarchy theme set rebuilds that staged theme directory (rm -rf "$CURRENT_THEME_PATH" then mv of next-theme), so the file behind the symlink changes and the next Neovim start reads the new spec. The staged neovim.lua comes from one of two places. 15 of the 22 shipped themes carry their own neovim.lua. For the other 7 (ethereal, last-horizon, lupine, miasma, ristretto, vantablack, white) omarchy-theme-set-templates generates one from $OMARCHY_PATH/default/themed/neovim.lua.tpl, which uses bjarneo/aether.nvim and asks for colorscheme = "aether". A theme cloned by omarchy theme install always gets the generated one, because staging drops every *.lua a cloned theme ships.
The error is LazyVim's, raised in lua/lazyvim/config/init.lua when vim.cmd.colorscheme() throws, and its on_error falls back to Neovim's builtin habamax:
}, {
msg = "Could not load your colorscheme",
on_error = function(msg)
LazyVim.error(msg)
vim.cmd.colorscheme("habamax")
end,
})
So the failure means the plugin checkout under ~/.local/share/nvim/lazy/ does not register the name the staged neovim.lua asked for. That is a plugin pin problem, not a theme bug. For catppuccin, upstream renamed the colorscheme to catppuccin-nvim in catppuccin/nvim PR #977, released in v2.0.0 on 2026-04-02, because Neovim 0.12 ships its own builtin catppuccin at /usr/share/nvim/runtime/colors/catppuccin.vim. A checkout from before v2.0.0 has no colors/catppuccin-nvim.vim, so the name genuinely is missing.
Omarchy 4 does ship a lazy-lock.json, contrary to the cited issue thread, and its catppuccin pin (edefef779ab08ce1a4a404713e3012b0d202bd35) is already past the rename, so a fresh 4.0.2 install does not hit the catppuccin case. What still hits it is a lock that predates the current one, because omarchy update never rewrites an existing account's ~/.config/nvim/lazy-lock.json. The same applies to aether, which an older lock does not carry at all, so on such an install every theme with no shipped neovim.lua, and every theme installed from a git repo, asks for a colorscheme that is not on disk.
Fix
First find out what Omarchy asked for and what your Neovim actually has. Both are read-only.
# what the current theme asks LazyVim to load
grep colorscheme ~/.local/state/omarchy/current/theme/neovim.lua
# every colorscheme name this Neovim can resolve
ls ~/.local/share/nvim/lazy/*/colors/*.lua ~/.local/share/nvim/lazy/*/colors/*.vim \
/usr/share/nvim/runtime/colors/*.vim /usr/share/nvim/runtime/colors/*.lua 2>/dev/null \
| xargs -n1 basename | sed 's/\.\(lua\|vim\)$//' | sort -u
If the name from the first command is in the second list, the colorscheme is not the problem and you are looking at a different plugin error. If it is missing, read on.
**Case 1: your lock file has drifted from the one Omarchy ships.** This is the usual cause on an install that has been upgraded rather than freshly installed.
diff /usr/share/omarchy-nvim/config/lazy-lock.json ~/.config/nvim/lazy-lock.json
If they differ, take Omarchy's pins back:
cp ~/.config/nvim/lazy-lock.json ~/.config/nvim/lazy-lock.json.bak
cp /usr/share/omarchy-nvim/config/lazy-lock.json ~/.config/nvim/lazy-lock.json
nvim
then in Neovim run :Lazy restore, wait for it to finish, quit and reopen. For catppuccin specifically the shipped pin is edefef779ab08ce1a4a404713e3012b0d202bd35, which does register catppuccin-nvim:
ls ~/.local/share/nvim/lazy/catppuccin/colors/
# catppuccin-frappe.lua catppuccin-latte.lua catppuccin.lua
# catppuccin-macchiato.lua catppuccin-mocha.lua catppuccin-nvim.vim
**Case 2: the locks match but the plugin was never fetched.** Open nvim and run :Lazy install, or :Lazy update <plugin> for one plugin, for example :Lazy update catppuccin.
**Case 3: a theme you installed yourself, or a shipped theme with no Neovim fragment.** Staging drops every *.lua from a theme cloned by omarchy theme install, and 7 shipped themes ship no neovim.lua, so in both cases Omarchy generates the spec from its own template and asks for aether:
grep -n 'aether\|colorscheme' ~/.local/state/omarchy/current/theme/neovim.lua
ls ~/.local/share/nvim/lazy/aether/colors/
If ~/.local/share/nvim/lazy/aether is absent, the plugin is simply not installed. Fix it the same way as case 1 or case 2. There is no per-theme colorscheme to hunt for, because a third-party theme is never allowed to supply one.
**Do not edit ~/.config/nvim/lua/plugins/theme.lua.** It is a symlink into the staged theme directory, so an edit there writes into ~/.local/state/omarchy/current/theme/neovim.lua and the next omarchy theme set deletes it:
ls -l ~/.config/nvim/lua/plugins/theme.lua
If you want a colorscheme of your own that survives theme changes, put it in a separate spec file whose name sorts after theme:
-- ~/.config/nvim/lua/plugins/zz-colorscheme.lua
return {
{ "LazyVim/LazyVim", opts = { colorscheme = "catppuccin-mocha" } },
}
lazy.nvim imports a plugins directory in alphabetical order of module name (table.sort on modname in lua/lazy/core/plugin.lua), so the later file's opts.colorscheme wins and Omarchy's theme switching leaves it alone.
Verify
nvim opens with no error banner, and :echo g:colors_name prints the same name that grep colorscheme ~/.local/state/omarchy/current/theme/neovim.lua reports. :Lazy shows the theme plugin as installed rather than pending.