I have an nvim config which I manage with home-manager. To avoid having to wait for a home-manager switch every time I make a tiny change to my nvim config, I use nvim -u path/to/nix/config/nvim/init.lua for testing configuration changes.
I recently decided I wanted to try splitting up my giant init.lua into modules. However, it seems like nvim -u doesn’t know how to load modules require-d by init.lua (at least when they’re relative to that init.lua), so I get errors like module 'options' not found.
Another option would be copy or rename within the $HOME/.config directory. Though I think the cleanest would be symlinks because it does not involve touching the various config directories. And with symlinks it’s easy to have as many alternate configs as you want.
That’s a great idea, thanks. It’s slightly more unwieldy, since you have to put everything back afterwards, but might be more convenient if I script it.