mirror of https://github.com/folke/lazy.nvim.git
docs: added docs for statusline and count
This commit is contained in:
parent
48a596e1d4
commit
17fd57a5f3
32
README.md
32
README.md
|
@ -384,6 +384,36 @@ Any operation can alternatively be started with a sub command or API function:
|
||||||
|
|
||||||
<!-- commands:end -->
|
<!-- commands:end -->
|
||||||
|
|
||||||
|
If you want to display the number of plugins on your dashboard, you can use
|
||||||
|
this simple API:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
local plugins = require("lazy").stats().count
|
||||||
|
```
|
||||||
|
|
||||||
|
**lazy.nvim** provides a statusline component that you can use to show the number of pending updates.
|
||||||
|
Make sure to enable `config.checker.enabled = true` to make this work.
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Example of configuring <a href="https://github.com/nvim-lualine/lualine.nvim">lualine.nvim</a></summary>
|
||||||
|
|
||||||
|
```lua
|
||||||
|
require("lualine").setup({
|
||||||
|
sections = {
|
||||||
|
lualine_x = {
|
||||||
|
{
|
||||||
|
require("lazy.status").updates,
|
||||||
|
cond = require("lazy.status").has_updates,
|
||||||
|
color = { fg = "#ff9e64" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
## 🔒 Lockfile `lazy-lock.json`
|
## 🔒 Lockfile `lazy-lock.json`
|
||||||
|
|
||||||
After every **update**, the local lockfile is updated with the installed revisions.
|
After every **update**, the local lockfile is updated with the installed revisions.
|
||||||
|
@ -401,6 +431,8 @@ Great care has been taken to make the startup code (`lazy.core`) as efficient as
|
||||||
During startup, all lua files used before `VimEnter` or `BufReadPre` are byte-compiled and cached,
|
During startup, all lua files used before `VimEnter` or `BufReadPre` are byte-compiled and cached,
|
||||||
similar to what [impatient.nvim](https://github.com/lewis6991/impatient.nvim) does.
|
similar to what [impatient.nvim](https://github.com/lewis6991/impatient.nvim) does.
|
||||||
|
|
||||||
|
My config for example loads in about `11ms` with `93` plugins. I do a lot of lazy-loading though :)
|
||||||
|
|
||||||
**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you improve performance.
|
**lazy.nvim** comes with an advanced profiler `:Lazy profile` to help you improve performance.
|
||||||
The profiling view shows you why and how long it took to load your plugins.
|
The profiling view shows you why and how long it took to load your plugins.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue