mirror of https://github.com/folke/lazy.nvim.git
fix: always add config/after to rtp
This commit is contained in:
parent
13b5688487
commit
c98e722fa4
|
@ -6,7 +6,7 @@ local M = {}
|
||||||
M.defaults = {
|
M.defaults = {
|
||||||
root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed
|
root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed
|
||||||
defaults = {
|
defaults = {
|
||||||
lazy = false, -- should plugins be loaded at startup?
|
lazy = false, -- should plugins be lazy-loaded?
|
||||||
version = nil,
|
version = nil,
|
||||||
-- version = "*", -- enable this to try installing the latest stable versions of plugins
|
-- version = "*", -- enable this to try installing the latest stable versions of plugins
|
||||||
},
|
},
|
||||||
|
@ -53,8 +53,8 @@ M.defaults = {
|
||||||
performance = {
|
performance = {
|
||||||
---@type LazyCacheConfig
|
---@type LazyCacheConfig
|
||||||
cache = nil,
|
cache = nil,
|
||||||
reset_packpath = true, -- packpath will be reset to only include lazy. This makes packadd a lot faster
|
reset_packpath = true, -- packpath will be reset to nothing. This will improver startup time.
|
||||||
reset_rtp = true,
|
reset_rtp = true, -- the runtime path will be reset to $VIMRUNTIME and your config directory
|
||||||
},
|
},
|
||||||
debug = false,
|
debug = false,
|
||||||
}
|
}
|
||||||
|
@ -88,9 +88,10 @@ function M.setup(spec, opts)
|
||||||
local me = debug.getinfo(1, "S").source:sub(2)
|
local me = debug.getinfo(1, "S").source:sub(2)
|
||||||
me = vim.fn.fnamemodify(me, ":p:h:h:h:h")
|
me = vim.fn.fnamemodify(me, ":p:h:h:h:h")
|
||||||
vim.opt.rtp = {
|
vim.opt.rtp = {
|
||||||
vim.fn.stdpath("config"),
|
|
||||||
"$VIMRUNTIME",
|
"$VIMRUNTIME",
|
||||||
|
vim.fn.stdpath("config"),
|
||||||
me,
|
me,
|
||||||
|
vim.fn.stdpath("config") .. "/after",
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,6 @@ function M.setup()
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.init_plugins()
|
function M.init_plugins()
|
||||||
Util.track("loader")
|
|
||||||
|
|
||||||
Util.track({ start = "init" })
|
Util.track({ start = "init" })
|
||||||
for _, plugin in pairs(Config.plugins) do
|
for _, plugin in pairs(Config.plugins) do
|
||||||
-- run plugin init
|
-- run plugin init
|
||||||
|
@ -52,8 +50,6 @@ function M.init_plugins()
|
||||||
M.load(plugin, { start = "startup" })
|
M.load(plugin, { start = "startup" })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Util.track()
|
|
||||||
|
|
||||||
Util.track()
|
Util.track()
|
||||||
M.init_done = true
|
M.init_done = true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue