Skip to content

2025#

A tip for conveniently switching between Neovim configurations

Abstract

Introducing Neovim’s environment variable NVIM_APPNAME for switching between different configurations.

If you use Neovim as your text editor, then maybe my problem sounds familiar to you:

  • I’ve copied code snippets from various people and am hacking together the configuration that fits me perfectly, but it still has rough edges and some things are just broken because I don’t really know what I’m doing.
  • There are fantastic, pre-configured Neovim distributions like LazyVim, maintained by people who know what they’re doing, but they don’t include the customizations I picked up over the time.

Eventually, I will have my own tweaks and configurations sorted out, but I need a working—and not just working but beautiful and enabling—text editor today. I want to be able to switch between LazyVim (as my day-to-day text editor configuration) and my own custom configuration.

Today I learned about the environment variable NVIM_APPNAME that makes this much more convenient than what I’ve been doing until now.