mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-20 05:16:45 +00:00
feat(cmd): added Lazy load all
to load all plugins
This commit is contained in:
parent
53e1c49bae
commit
11131eafa1
1 changed files with 6 additions and 0 deletions
|
@ -69,6 +69,9 @@ function M.complete(cmd, prefix)
|
||||||
end
|
end
|
||||||
---@type string[]
|
---@type string[]
|
||||||
local plugins = {}
|
local plugins = {}
|
||||||
|
if cmd == "load" then
|
||||||
|
plugins[#plugins + 1] = "all"
|
||||||
|
end
|
||||||
for name, plugin in pairs(Config.plugins) do
|
for name, plugin in pairs(Config.plugins) do
|
||||||
if cmd ~= "load" or not plugin._.loaded then
|
if cmd ~= "load" or not plugin._.loaded then
|
||||||
plugins[#plugins + 1] = name
|
plugins[#plugins + 1] = name
|
||||||
|
@ -86,6 +89,9 @@ function M.setup()
|
||||||
---@type ManagerOpts
|
---@type ManagerOpts
|
||||||
local opts = { wait = cmd.bang == true }
|
local opts = { wait = cmd.bang == true }
|
||||||
local prefix, args = M.parse(cmd.args)
|
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
|
if #args > 0 then
|
||||||
---@param plugin string
|
---@param plugin string
|
||||||
opts.plugins = vim.tbl_map(function(plugin)
|
opts.plugins = vim.tbl_map(function(plugin)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue