Clone lazy.nvim automatically if missing.

Section: Plugins and health checks

Bootstrap lazy.nvim

lua
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", lazypath })
end
vim.opt.rtp:prepend(lazypath)
Explanation

A common modern bootstrap pattern for plugin management.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Plugins and health checks
Declare plugins with lazy.nvim
Register plugins and dependencies in Lua.
OpenIn sheetluasame section
Run :checkhealth
Inspect provider and plugin setup issues.
OpenIn sheetvimsame section
Go to definition
Jump to the definition of the symbol under cursor.
OpenIn sheetlua1 tag match
Configure nvim-treesitter
Install parsers and enable syntax-aware modules.
OpenIn sheetlua1 tag match
Find references
List all references to a symbol.
OpenIn sheetlua1 tag match
Use Treesitter textobjects
Select functions and classes structurally.
OpenIn sheetlua1 tag match