Neovim for Beginners —Plugin Management

Manage Neovim packages using a plugin or package manager.

alpha2phi
6 min readDec 29, 2021
Neovim for Beginners — Plugin Management

Let’s understand Neovim packages (:h packages), and see how to properly manage them using a plugin/package manager (packer.nvim).

We are going to

  • Understand how packages work in Neovim.
  • Configure profiling to monitor and profile the plugins.
  • Understand the different options to lazy load plugins for better startup performance.
  • Lazy load plugins using different options.
  • Configure other useful plugins and lazy load them.

This article is part of the Neovim for Beginners series.

The Neovim configuration files can be found in this repository.

Packages

Let’s begin with the XDG base directory.

Neovim uses the $XDG_CONFIG_HOME and $XDG_DATA_HOME environment variables if they exist.

  • For Linux/Unix, the$XDG_CONFIG_HOME configuration directory defaults to ~/.config and~/.config/nvim. In Windows, it defaults to ~/AppData/Local ~/AppData/Local/nvim.
  • For the data directory $XDG_DATA_HOME, in Linux/Unix it defaults to ~/.local/share and ~/.local/share/nvim. In…

--

--

alpha2phi

Software engineer, Data Science and ML practitioner.