Skip to content

Instantly share code, notes, and snippets.

@tabrez
Last active August 22, 2023 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tabrez/35ea0674f489a322e4b84060d783d15b to your computer and use it in GitHub Desktop.
Save tabrez/35ea0674f489a322e4b84060d783d15b to your computer and use it in GitHub Desktop.
How to maintain separate neovim configs

How to maintain separate neovim configs

LunarVim

Installation

LunarVim has very little documentation but the creator of the config has many videos on how to create similar vim configurations from scratch.

LunarVim installs its config in a separate folder and doesn't conflict with any neovim config already present.

AstroVim

Installation

AstroVim has good documentation on its website but not many videos going into the details of the configuration.

Use the following commands instead to install astrovim to use a config folder separate from nvim config folder:

git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/astrovim
rm -rf ~/.config/astrovim/.git
# add the following line to ~/.bashrc if you like
alias av="NVIM_APPNAME=astrovim nvim"
av

LazyVim

Installation

LazyVim has the best documentation.

Use the following commands instead to install lazyvim to use a config folder separate from nvim config folder:

git clone https://github.com/LazyVim/starter ~/.config/lazyvim
rm -rf ~/.config/lazyvim/.git
# add the following line to ~/.bashrc if you like
alias lv="NVIM_APPNAME=lazyvim nvim"
lv

NOTE

  • You need Neovim 0.9 or later for the above method to work. Current stable version of Neovim is 0.9.1
wget https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.tar.gz
tar -xzf nvim-linux64.tar.gz ~/.local/bin/

Add the following to ~/.bashrc:

if [ -d ~/.local/bin/nvim-linux64/bin ]; then
  export PATH=$PATH:~/.local/bin/nvim-linux64/bin
fi
  • Above method also creates separate ~/.local/share, ~/.local/state & ~/.cache folders for each config along with a separate ~/.config/ folder
  • You don't strictly need to take the backups as per the installation instructions of AstroVim and LazyVim if using the above method as the folders used by Neovim are untouched
  • NVChad is another popular neovim config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment