Neovim nightly includes an NVIM_APPNAME variable that can be set to define the location of the configuration, so different configs can be quickly evaluated
Adding aliases to the shell (.zshrc.bashrc) provides a simple way to run specific config.
alias nvim-lazy="NVIM_APPNAME=LazyVim nvim"
alias nvim-kick="NVIM_APPNAME=kickstart nvim"
alias nvim-chad="NVIM_APPNAME=NvChad nvim"
alias nvim-astro="NVIM_APPNAME=AstroNvim nvim"
An example zsh function provides a selection popup for choosing a config
function nvim-selector() {
items=("default" "kickstart" "LazyVim" "NvChad" "AstroNvim")
config=$(printf "%s\n" "${items[@]}" | fzf --prompt=" Neovim Config " --height=~50% --layout=reverse --border --exit-0)
if [[ -z $config ]]; then
echo "Nothing selected"
return 0
elif [[ $config == "default" ]]; then
config=""
fi
NVIM_APPNAME=$config nvim $@
}
Create a key bindings to launch the nvim-selector command
Neovim nightly includes an NVIM_APPNAME variable that can be set to define the location of the configuration, so different configs can be quickly evaluated
Adding aliases to the shell (
.zshrc
.bashrc
) provides a simple way to run specific config.An example zsh function provides a selection popup for choosing a config
Create a key bindings to launch the nvim-selector command
Reference
https://gist.github.com/elijahmanor/b279553c0132bfad7eae23e34ceb593b
https://youtube.com/watch?v=LkHjJlSgKZY