Esta página se muestra en inglés. Una traducción al español está en curso.
ConfigsMay 14, 2026·3 min de lectura

lazy.nvim — Modern Plugin Manager for Neovim

A fast and feature-rich plugin manager for Neovim that handles lazy loading, lockfiles, profiling, and automatic builds with a clean Lua-based spec format.

Listo para agents

Este activo puede ser leído e instalado directamente por agents

TokRepo expone un comando CLI universal, contrato de instalación, metadata JSON, plan según adaptador y contenido raw para que los agents evalúen compatibilidad, riesgo y próximos pasos.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
lazy.nvim Overview
Comando CLI universal
npx tokrepo install ebd5fae6-4fb0-11f1-9bc6-00163e2b0d79

Introduction

lazy.nvim is the standard plugin manager for modern Neovim configurations. It replaces older tools like packer.nvim with a declarative Lua spec format, automatic lazy loading based on events, commands, keymaps, and filetypes, and a built-in UI for managing and profiling plugins.

What lazy.nvim Does

  • Installs, updates, and removes Neovim plugins from Git repositories and local paths
  • Lazy-loads plugins based on events, commands, keymaps, or filetypes automatically
  • Generates and maintains a lockfile (lazy-lock.json) for reproducible setups
  • Provides a built-in profiler showing startup time per plugin
  • Supports automatic post-install build steps (make, cargo, npm, etc.)

Architecture Overview

lazy.nvim stores plugins in a flat directory under stdpath("data")/lazy/. Each plugin spec is a Lua table declaring its source, dependencies, lazy-loading triggers, and configuration function. At startup, lazy.nvim reads the lockfile to verify versions, loads only the plugins whose triggers have fired, and defers the rest. The :Lazy UI provides a real-time view of plugin status, updates, and profiling data.

Self-Hosting & Configuration

  • Bootstrap lazy.nvim with the snippet above in your init.lua
  • Define plugin specs as Lua files in a plugins/ directory
  • Run :Lazy sync to install, update, and clean plugins in one step
  • Commit lazy-lock.json to version control for reproducible environments
  • Requires Neovim 0.8+ and Git

Key Features

  • Automatic lazy loading reduces startup to only the plugins you need at launch
  • Lockfile support pins exact commits for each plugin
  • Built-in profiler identifies slow plugins with per-plugin timing
  • Spec fragments let multiple files contribute to one plugin's configuration
  • Concurrency during install and update operations for fast package management

Comparison with Similar Tools

  • packer.nvim — predecessor using a compile step; lazy.nvim is faster and actively maintained
  • vim-plug — Vimscript-based, simpler; lazy.nvim offers richer Lua-native lazy loading
  • dein.vim — supports caching; lazy.nvim provides a more intuitive spec format and UI
  • mini.deps — minimalist approach; lazy.nvim has more features like profiling and lockfiles
  • rocks.nvim — uses luarocks for packaging; lazy.nvim manages Git-based plugin sources directly

FAQ

Q: How do I migrate from packer.nvim? A: Convert your use() calls to lazy.nvim spec tables. The format is similar but uses different keys (opts instead of config, event/cmd/keys for lazy loading).

Q: Can I pin a plugin to a specific version? A: Yes. Set the version field in the spec (e.g., version = "^2") or commit the lockfile for exact pins.

Q: How do I profile startup time? A: Run :Lazy profile to see a ranked list of plugins by load time.

Q: Does lazy.nvim support local plugins? A: Yes. Set dir to the local path instead of specifying a Git URL.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados