Multiple Configs
Multiple Configurationsλ︎
Many Neovim configurations can be installed in $HOME/.config/
using unique directory names, e.g. AstroNvim, cajus, lazyvim, kickstart.
Set NVIM_APPNAME
to a configuration directory name (relative to $HOME/.config/`) to run Neovim with that specific config.
The configuration directory name is used to save local share
, state
and cache
files for that specific configuration.
Community Configuration Projects
- kickstart.nvim a highly documented starter configuration to effectively build your own
- LazyVim lazy & mason configuration
- Magit Kit fennel configuration from the author of Conjure
- cajus-nvim inspiration for practicalli/neovim-config-redux
Configure shell aliasλ︎
Create a Shell alias for each configuration that will be used, to avoid setting the NVIM_APPNAME
variable each time.
Add alias to .bashrc
for Bash shell or .zshrc
for Zsh
Define Shell Aliases to run each configuration
shell-aliases for bash and zshλ︎
Create a .config/shell-aliases
file containing all shell aliases when often switching between different shells, avoiding the need to define aliases twice
Source the .config/shell-aliases
file from within .bashrc
or .zshrc
Neovim config selectorλ︎
Create a shell function to popup a menu with the list of available Neovim configurations, defined in ~/.config
where the configuration directories are prefixed with nvim-
, e.g. ~/.config/nvim-astro/
Neovim Config Fuzzy Finder
nvim-fuzy-find() {
# All config paths are prefixed with ~/.config/nvim-
local config=$(fdfind --max-depth 1 --glob 'nvim-*' ~/.config | fzf --prompt="Neovim Configs > " --height=15% --layout=reverse --border --exit-0)
[[ -z $config ]] && echo "No config selected, Neovim not starting" && return
# Open Neovim with selected config
NVIM_APPNAME=$(basename $config) nvim $@
}