nvim-env is a user script to make it easy to install and use multiple config for your Neovim.
- 🔥 add new config from git
- 🚀 custom name
- Neovim >= 0.9.4 (tested)
- Git >= 2.19.0 (for partial clones support)
- Bash
Using Git
git clone https://github.com/ariefra/nvim-env
cd nvim-env
chmod +x nvim-env
./nvim-env --helpDisplay usage information
-
nvim-env --help
Examples:
nvim-env --help
Add new environment
-
nvim-env --add [env] [git-url]
Examples:
nvim-env --add nv https://github.com/appelgriebsch/Nv nvim-env --add mnabila https://github.com/mnabila/nvimrc nvim-env --add znvim https://github.com/Zeddnyx/Znvim nvim-env --add adics https://github.com/AdiCahyaSaputra/my-neovim-setup nvim-env --add lunarvim https://github.com/LunarVim/LunarVim nvim-env --add astrovim https://github.com/AstroNvim/AstroNvim nvim-env --add doomnvim https://github.com/doom-neovim/doom-nvim
Run nvim environment
-
nvim-env --run [env] [other_nvim_args]
Examples:
nvim-env --run nv nvim-env --run mnabila & nvim-env --run znvim
List available nvim environment
-
nvim-env --ls
Examples:
nvim-env --ls
Delete nvim environment
-
nvim-env --rm [env]
Examples:
nvim-env --rm astrovim
Use user's home for common nvim environment
NVIM_USE_USERHOME=(true | false) nvim-env [parameters]
this prefix if set to true (default) will cause nvim-env to use your user home for data,state & cache using XDG_DATA_HOME, XDG_STATE_HOME, XDG_CACHE_HOME this will save space on your disk, and faster downloads for common plugins.
Caveat is that you need to use UPDATE only instead of sync (i.e. in lazy.nvim) to avoid deleting plugins needed by other, although they will be redownloaded if lazy.nvim updated in the other environment.
Examples: Nvchad requires indent-blankline.nvim version 2.20.7 instead of current, thus need isolated storage
NVIM_USE_USERHOME=false nvim-env --add nvchad https://github.com/NvChad/NvChad
NVIM_USE_USERHOME=false nvim-env --run nvchad