+
+
**lazy.nvim** is a modern plugin manager for Neovim.
@@ -7,9 +39,9 @@
## ✨ Features
- 📦 Manage all your Neovim plugins with a powerful UI
-- 🚀 Fast startup times thanks to automatic caching and bytecode compilation of lua modules
+- 🚀 Fast startup times thanks to automatic caching and bytecode compilation of Lua modules
- 💾 Partial clones instead of shallow clones
-- 🔌 Automatic lazy-loading of lua modules and lazy-loading on events, commands, filetypes, and key mappings
+- 🔌 Automatic lazy-loading of Lua modules and lazy-loading on events, commands, filetypes, and key mappings
- ⏳ Automatically install missing plugins before starting up Neovim, allowing you to start using it right away
- 💪 Async execution for improved performance
- 🛠️ No need to manually compile plugins
@@ -29,582 +61,9 @@
- Neovim >= **0.8.0** (needs to be built with **LuaJIT**)
- Git >= **2.19.0** (for partial clones support)
- a [Nerd Font](https://www.nerdfonts.com/) **_(optional)_**
+- [luarocks](https://luarocks.org/) to install rockspecs.
+ You can remove `rockspec` from `opts.pkg.sources` to disable this feature.
-## 📦 Installation
+## 🚀 Getting Started
-You can add the following Lua code to your `init.lua` to bootstrap **lazy.nvim**
-
-
-
-```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",
- "--single-branch",
- "https://github.com/folke/lazy.nvim.git",
- lazypath,
- })
-end
-vim.opt.runtimepath:prepend(lazypath)
-```
-
-
-
-Next step is to add **lazy.nvim** to the top of your `init.lua`
-
-```lua
-require("lazy").setup(plugins, opts)
-```
-
-- **plugins**: this should be a `table` or a `string`
- - `table`: a list with your [Plugin Spec](#-plugin-spec)
- - `string`: a Lua module name that contains your [Plugin Spec](#-plugin-spec). See [Structuring Your Plugins](#-structuring-your-plugins)
-- **opts**: see [Configuration](#%EF%B8%8F-configuration) **_(optional)_**
-
-```lua
--- example using a list of specs with the default options
-vim.g.mapleader = " " -- make sure to set `mapleader` before lazy so your mappings are correct
-
-require("lazy").setup({
- "folke/which-key.nvim",
- { "folke/neoconf.nvim", cmd = "Neoconf" },
- "folke/neodev.nvim",
-})
-```
-
-ℹ️ It is recommended to run `:checkhealth lazy` after installation
-
-## 🔌 Plugin Spec
-
-| Property | Type | Description |
-| ---------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `[1]` | `string?` | Short plugin url. Will be expanded using `config.git.url_format` |
-| **dir** | `string?` | A directory pointing to a local plugin |
-| **url** | `string?` | A custom git url where the plugin is hosted |
-| **name** | `string?` | A custom name for the plugin used for the local plugin directory and as the display name |
-| **dev** | `boolean?` | When `true`, a local plugin directory will be used instead. See `config.dev` |
-| **lazy** | `boolean?` | When `true`, the plugin will only be loaded when needed. Lazy-loaded plugins are automatically loaded when their Lua modules are `required`, or when one of the lazy-loading handlers triggers |
-| **enabled** | `boolean?` or `fun():boolean` | When `false`, or if the `function` returns false, then this plugin will not be used |
-| **dependencies** | `LazySpec[]` | A list of plugin specs that should be loaded when the plugin loads. Dependencies are always lazy-loaded unless specified otherwise |
-| **init** | `fun(LazyPlugin)` | `init` functions are always executed during startup |
-| **config** | `fun(LazyPlugin)` or `true` or `table` | `config` is executed when the plugin loads. You can also set to `true` or pass a `table`, that will be passed to `require("plugin").setup(opts)` |
-| **build** | `fun(LazyPlugin)` or `string` | `build` is executed when a plugin is installed or updated. If it's a string it will be ran as a shell command. When prefixed with `:` it is a Neovim command. |
-| **branch** | `string?` | Branch of the repository |
-| **tag** | `string?` | Tag of the repository |
-| **commit** | `string?` | Commit of the repository |
-| **version** | `string?` | Version to use from the repository. Full [Semver](https://devhints.io/semver) ranges are supported |
-| **pin** | `boolean?` | When `true`, this plugin will not be included in updates |
-| **event** | `string?` or `string[]` | Lazy-load on event |
-| **cmd** | `string?` or `string[]` | Lazy-load on command |
-| **ft** | `string?` or `string[]` | Lazy-load on filetype |
-| **keys** | `string?` or `string[]` or `LazyKeys[]` | Lazy-load on key mapping |
-| **module** | `false?` | Do not automatically load this Lua module when it's required somewhere |
-
-### Lazy Loading
-
-**lazy.nvim** automagically lazy-loads Lua modules, so it is not needed to
-specify `module=...` everywhere in your plugin specification. This mean that if
-you have a plugin `A` that is lazy-loaded and a plugin `B` that requires a
-module of plugin `A`, then plugin `A` will be loaded on demand as expected.
-
-If you don't want this behavior for a certain plugin, you can specify that with `module=false`.
-You can then manually load the plugin with `:Lazy load foobar.nvim`.
-
-Colorscheme plugins can be configured with `lazy=true`. The plugin will automagically load
-when doing `colorscheme foobar`.
-
-You can configure **lazy.nvim** to lazy-load all plugins by default with `config.defaults.lazy = true`.
-
-Additionally, you can also lazy-load on **events**, **commands**,
-**file types** and **key mappings**.
-
-Plugins will be lazy-loaded when one of the following is `true`:
-
-- the plugin only exists as a dependency in your spec
-- it has an `event`, `cmd`, `ft` or `keys` key
-- `config.defaults.lazy == true`
-
-#### ⌨️ Lazy Key Mappings
-
-The `keys` property can be a `string` or `string[]` for simple normal-mode mappings, or it
-can be a `LazyKeys` table with the following key-value pairs:
-
-- **[1]**: (`string`) lhs **_(required)_**
-- **[2]**: (`string|fun()`) rhs **_(optional)_**
-- **mode**: (`string|string[]`) mode **_(optional, defaults to `"n"`)_**
-- any other option valid for `vim.keymap.set`
-
-Key mappings will load the plugin the first time they get executed.
-
-When `[2]` is `nil`, then the real mapping has to be created by the `config()` function.
-
-```lua
--- Example for neo-tree.nvim
-{
- "nvim-neo-tree/neo-tree.nvim",
- keys = {
- { "