Skip to content

Commit

Permalink
feat(cmd): added Lazy load all to load all plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 18, 2023
1 parent 53e1c49 commit 11131ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/lazy/view/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 11131ea

Please sign in to comment.