-
-
+# 💤 lazy.nvim
**lazy.nvim** is a modern plugin manager for Neovim.
@@ -39,9 +7,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
@@ -54,16 +22,530 @@
- 🔎 Automatically check for updates
- 📋 Commit, branch, tag, version, and full [Semver](https://devhints.io/semver) support
- 📈 Statusline component to see the number of pending updates
-- 🎨 Automatically lazy-loads colorschemes
## ⚡️ Requirements
- 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.
-## 🚀 Getting Started
+## 📦 Installation
-Check the [documentation website](https://lazy.folke.io/) for more information.
\ No newline at end of file
+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 laz-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)` | `config` is executed when the plugin loads |
+| **build** | `fun(LazyPlugin)` | `build` is executed when a plugin is installed or updated |
+| **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[]` | 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`.
+
+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 `cmd` key
+- it defines an `init` method
+- `config.defaults.lazy == true`
+
+### Versioning
+
+If you want to install a specific revision of a plugin, you can use `commit`,
+`tag`, `branch`, `version`.
+
+The `version` property supports [Semver](https://semver.org/) ranges.
+
+