From 11131eafa165e54b08aeff3d7e35c65ef8b6e034 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 May 2023 19:51:14 +0200 Subject: [PATCH] feat(cmd): added `Lazy load all` to load all plugins --- lua/lazy/view/commands.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/lazy/view/commands.lua b/lua/lazy/view/commands.lua index f1ab877..0476400 100644 --- a/lua/lazy/view/commands.lua +++ b/lua/lazy/view/commands.lua @@ -69,6 +69,9 @@ function M.complete(cmd, prefix) end ---@type string[] local plugins = {} + if cmd == "load" then + plugins[#plugins + 1] = "all" + end for name, plugin in pairs(Config.plugins) do if cmd ~= "load" or not plugin._.loaded then plugins[#plugins + 1] = name @@ -86,6 +89,9 @@ function M.setup() ---@type ManagerOpts local opts = { wait = cmd.bang == true } local prefix, args = M.parse(cmd.args) + if #args == 1 and args[1] == "all" then + args = vim.tbl_keys(Config.plugins) + end if #args > 0 then ---@param plugin string opts.plugins = vim.tbl_map(function(plugin)