Skip to content

Neovim Configurationλ︎

Practicalli Neovim covers the following configurations.

  • AstroNvim - thoughtful configuration, supports Neovim 0.9 onward, polished UI, many community extensions
  • Practicalli Neovim Config Redux - mnemonic key bindings, packer, telescope selector, written in Fennel

Multiple Configurationsλ︎

Install multiple configurations, e.g. AstroNvim, lazyvim, Nvchad, etc. in the $HOME/.config directory using unique directory names.

Set NVIM_APPNAME to specific the configuration to use when running nvim.

NVIM_APPNAME=astronvim nvim

NVIM_APPNAME variable should be set to the directory name containing the configuration, relative to the .config directory.

The configuration directory name is used to hold share, state and cache files for that specific configuration.

Create shell aliases for each configuration. Optionalliy, define a terminal UI selection to choose a configuration.

Create a Shell alias for each configuration that will be used, to avoid setting the NVIM_APPNAME variable each time.

Define Shell Aliases to run each configuration

alias astro="NVIM_APPNAME=astronvim nvim"
alias lazyvim="NVIM_APPNAME=lazyvim nvim"
alias practicalli-redux="NVIM_APPNAME=neovim-config-redux nvim"

Create an nvim configuration selector script, with items listing the directory name of each configuration

Z Shell nvim-selector script

.local/bin/nvim-selector
function nvim-selector() {
  items=("astronvim" "neovim-config-redux" "lazyvim")
  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 $@
}