lazy.nvim: a modern plugin manager that actually handles lazy-loading well
GitHub RepoImpressions60
View on GitHub
@githubprojectsPost Author

Lazy Loading for Neovim Plugins, Done Right

If you've been using Neovim for a while, you've probably noticed that plugin managers have been getting smarter. But most of them still make you jump through hoops to lazy-load plugins. You write complicated autocmd patterns, or you break your config into separate files. It works, but it feels like fighting the tool.

Enter lazy.nvim. It's a modern plugin manager that treats lazy loading as a first class feature instead of an afterthought. And it does it in a way that feels natural, not forced.

What It Does

lazy.nvim is a plugin manager built specifically for Neovim 0.5+. It handles installing, updating, and most importantly, lazy loading your plugins. When you tell it to lazy load, it actually does it properly: your plugins only get loaded when you actually need them, not on startup. This means your editor starts faster, uses less memory, and stays snappy even with 100+ plugins.

Why It's Cool

Most plugin managers implement lazy loading as an optional add on. You define events or keymaps manually, and hope the timing works out. lazy.nvim flips this around. It assumes you want lazy loading by default and makes the common cases effortless:

  • Event based loading: Automatically load plugins when you open a file type, hit a key, or run a command.
  • Module based loading: If a plugin is only needed for specific Lua modules, lazy.nvim loads it when you require that module.
  • Import based loading: You can organize plugins into separate files and lazy.nvim will import them only when their conditions are met.
  • Built in profiling: It shows you a startup time breakdown so you know exactly what's slowing things down.

The real magic is how clean your config stays. Instead of splitting your plugin specifications across event handlers, you just add a lazy = true or an event = "VeryLazy" to your plugin spec. Everything else happens automatically.

How to Try It

If you're switching from another plugin manager, the migration is straightforward. Here's the quickstart:

  1. Add lazy.nvim to your Neovim config (drop this in ~/.config/nvim/init.lua):
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git", "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable",
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
  -- Your plugins go here
})
  1. Restart Neovim and run :Lazy to see the UI.

  2. Check out the GitHub README for the full list of options and a migration guide.

Final Thoughts

lazy.nvim isn't revolutionary in the sense that it does something completely new. But it is refreshing because it takes the concept of lazy loading and implements it in a way that actually reduces config complexity. If you're tired of your Neovim taking 3 seconds to start with 50 plugins, or you just want a simpler way to organize your plugin setup, this is worth a look.

It's one of those tools that makes you wonder why plugin managers weren't always built this way.


Find more developer tools and projects at [@githubprojects] on Twitter.

Back to Projects
Last updated: June 18, 2026 at 07:53 AM