From 630a34da823596552938908f8ef04ee339c8fa82 Mon Sep 17 00:00:00 2001 From: Dayvid Albuquerque Date: Sun, 7 Jan 2024 12:47:48 -0300 Subject: [PATCH] feat(ui): add option to disable lazy.nvim installer interface --- README.md | 2 ++ doc/lazy.nvim.txt | 2 ++ lua/lazy/core/config.lua | 1 + lua/lazy/core/loader.lua | 3 ++- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ebcca6a..76df3b1 100644 --- a/README.md +++ b/README.md @@ -464,6 +464,8 @@ return { -- Track each new require in the Lazy profiling tab require = false, }, + -- Show the lazy.nvim installer interface + show_ui = true, } ``` diff --git a/doc/lazy.nvim.txt b/doc/lazy.nvim.txt index 4c69064..6b80dd8 100644 --- a/doc/lazy.nvim.txt +++ b/doc/lazy.nvim.txt @@ -567,6 +567,8 @@ CONFIGURATION *lazy.nvim-lazy.nvim-configuration* -- Track each new require in the Lazy profiling tab require = false, }, + -- Show the lazy.nvim installer interface + show_ui = true, } < diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 1fbf3ef..cf2db8e 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -174,6 +174,7 @@ M.defaults = { -- Track each new require in the Lazy profiling tab require = false, }, + show_ui = true, debug = false, } diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index 0dc9e9f..2d63c1f 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -73,7 +73,8 @@ function M.install_missing() end end Cache.reset() - require("lazy.manage").install({ wait = true, lockfile = true, clear = false }) + + require("lazy.manage").install({ show = Config.options.show_ui, wait = true, lockfile = true, clear = false }) -- remove any installed plugins from indexed, so cache will index again for _, p in pairs(Config.plugins) do if p._.installed then