Skip to content

Commit

Permalink
perf: lazy-load the commands available on the lazy module
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 18, 2022
1 parent 48309dd commit b89e6bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/lazy/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ end

setmetatable(M, {
__index = function(_, key)
return require("lazy.view.commands").commands[key]
return function(...)
return require("lazy.view.commands").commands[key](...)
end
end,
})

Expand Down

0 comments on commit b89e6bf

Please sign in to comment.