Skip to content

Commit 23984dd

Browse files
committed
fix: set correct dir for lazy plugin
1 parent 2d65593 commit 23984dd

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lua/lazy/core/config.lua

+6-3
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ M.to_clean = {}
101101
---@type LazyConfig
102102
M.options = {}
103103

104+
---@type string
105+
M.me = nil
106+
104107
---@param spec LazySpec
105108
---@param opts? LazyConfig
106109
function M.setup(spec, opts)
@@ -113,10 +116,10 @@ function M.setup(spec, opts)
113116
vim.go.packpath = ""
114117
end
115118
if M.options.performance.rtp.reset then
116-
local me = debug.getinfo(1, "S").source:sub(2)
117-
me = vim.fn.fnamemodify(me, ":p:h:h:h:h")
119+
M.me = debug.getinfo(1, "S").source:sub(2)
120+
M.me = vim.fn.fnamemodify(M.me, ":p:h:h:h:h")
118121
vim.opt.rtp = {
119-
me,
122+
M.me,
120123
vim.env.VIMRUNTIME,
121124
vim.fn.stdpath("config"),
122125
vim.fn.stdpath("config") .. "/after",

lua/lazy/core/plugin.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ function M.load()
239239

240240
-- add ourselves
241241
spec.plugins["lazy.nvim"] = nil
242-
spec:add({ "folke/lazy.nvim", lazy = true, dev = false })
242+
spec:add({ "folke/lazy.nvim", lazy = true, dir = Config.me })
243243

244244
local existing = Config.plugins
245245
Config.plugins = spec.plugins

0 commit comments

Comments
 (0)