I would like to try out some fancy plugins, debug my own configuration and plugins, try out new Neovim versions. But I do want to keep my daily used Neovim stable (with fixed set of settings and plugins). I do not want to test them out in my normal home dir. I wonder if there is a way to provide me this convenience like python venv provided to python users.
I would like to be able to specify the Neovim environment like source <nvim env 1>/bin/active
or similar. Then the nvim won't look for my ~/.config/nvim or install plugins to ~/.local/*/nvim or similar paths. Instead everything should go into <nvim env 1>.
I would like to be able use several different environments simultaneously. This means any solution, that requires to mess around in my ~/.config or ~/.local to setup symlinks as workaround, actually won't work. For example:
- cheovim
- nvChad
- GNU stow
update
after digging around in the document, I think the best way to achieve this in neovim is to play with some variables:
- a shell environment variable: VIMRUNTIME, this may not be necessary, if nvim is installed with standard dir structure under parent dir.
- a shell environment variable: VIMINIT or MYVIMRC to change the first configure file it is going to load
- another shell environment variable: XDG_CONFIG_DIRS, system wide configs.
- in the virtual nvim rc, we need to
set runtimepath
to get rid of the~/
parts.
I will keep experimenting this. I actually hope other neovim developers had already done this. Otherwise, developing neovim is still very messy for the rest of us who do not want to fire up a vm.