diff --git a/README.md b/README.md index 0e64d0f..253e638 100644 --- a/README.md +++ b/README.md @@ -384,6 +384,36 @@ Any operation can alternatively be started with a sub command or API function: +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. + +
+Example of configuring lualine.nvim + +```lua +require("lualine").setup({ + sections = { + lualine_x = { + { + require("lazy.status").updates, + cond = require("lazy.status").has_updates, + color = { fg = "#ff9e64" }, + }, + }, + }, +}) + +``` + +
+ ## 🔒 Lockfile `lazy-lock.json` 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, 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. The profiling view shows you why and how long it took to load your plugins.