mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-28 03:24:13 +00:00
perf: when reloading plugin specs always use cache
This commit is contained in:
parent
e897524b1f
commit
060cf23aca
2 changed files with 6 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
local Config = require("lazy.core.config")
|
||||
local Util = require("lazy.core.util")
|
||||
local Handler = require("lazy.core.handler")
|
||||
local Cache = require("lazy.core.cache")
|
||||
|
||||
local M = {}
|
||||
|
||||
|
@ -217,7 +218,7 @@ function M.spec()
|
|||
---@diagnostic disable-next-line: no-unknown
|
||||
package.loaded[modname] = nil
|
||||
Util.try(function()
|
||||
spec:normalize(require(modname))
|
||||
spec:normalize(Cache.require(modname))
|
||||
end, "Failed to load **" .. modname .. "**")
|
||||
end
|
||||
local path_plugins = vim.fn.stdpath("config") .. "/lua/" .. Config.spec:gsub("%.", "/")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue