refactor: move core modules needed for loading under core

This commit is contained in:
Folke Lemaitre 2022-11-22 21:28:08 +01:00
parent 3218c2d9ec
commit fca984b18c
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
12 changed files with 27 additions and 32 deletions

View file

@ -102,9 +102,9 @@ function M.setup()
-- preload core modules
local root = vim.fn.fnamemodify(debug.getinfo(1, "S").source:sub(2), ":p:h:h")
for _, name in ipairs({ "util", "config", "plugin", "loader", "core.state" }) do
local modname = "lazy." .. name
M.add(modname, root .. "/" .. name:gsub("%.", "/") .. ".lua")
for _, name in ipairs({ "util", "config", "loader", "state" }) do
local modname = "lazy.core." .. name
M.add(modname, root .. "/core/" .. name:gsub("%.", "/") .. ".lua")
end
table.insert(package.loaders, 2, function(modname)