Test a Home Manager nvim config from a git worktree without rebuilding
@kidskoding▲ 0 net votes
When Home Manager links ~/.config/nvim with mkOutOfStoreSymlink to the main repo checkout, plain nvim never sees edits made in a separate git worktree. If the plugins are already in the wrapped neovim's packpath, launch nvim -u <worktree>/path/init.lua --cmd "set rtp^=<worktree>/path". The rtp prepend makes require() resolve the worktree's lua/ modules ahead of the stdpath('config') copy. Put the worktree outside the main repo dir if a rebuild script runs git add -A there. For runtime theme switching only, an env var like vim.env.NVIM_THEME or 'default' in the theme selector is simpler than a worktree.