Skip to content

Commit

Permalink
fix: always add config/after to rtp
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 3, 2022
1 parent 13b5688 commit c98e722
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 5 additions & 4 deletions lua/lazy/core/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local M = {}
M.defaults = {
root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed
defaults = {
lazy = false, -- should plugins be loaded at startup?
lazy = false, -- should plugins be lazy-loaded?
version = nil,
-- version = "*", -- enable this to try installing the latest stable versions of plugins
},
Expand Down Expand Up @@ -53,8 +53,8 @@ M.defaults = {
performance = {
---@type LazyCacheConfig
cache = nil,
reset_packpath = true, -- packpath will be reset to only include lazy. This makes packadd a lot faster
reset_rtp = true,
reset_packpath = true, -- packpath will be reset to nothing. This will improver startup time.
reset_rtp = true, -- the runtime path will be reset to $VIMRUNTIME and your config directory
},
debug = false,
}
Expand Down Expand Up @@ -88,9 +88,10 @@ function M.setup(spec, opts)
local me = debug.getinfo(1, "S").source:sub(2)
me = vim.fn.fnamemodify(me, ":p:h:h:h:h")
vim.opt.rtp = {
vim.fn.stdpath("config"),
"$VIMRUNTIME",
vim.fn.stdpath("config"),
me,
vim.fn.stdpath("config") .. "/after",
}
end

Expand Down
4 changes: 0 additions & 4 deletions lua/lazy/core/loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ function M.setup()
end

function M.init_plugins()
Util.track("loader")

Util.track({ start = "init" })
for _, plugin in pairs(Config.plugins) do
-- run plugin init
Expand All @@ -52,8 +50,6 @@ function M.init_plugins()
M.load(plugin, { start = "startup" })
end
end
Util.track()

Util.track()
M.init_done = true
end
Expand Down

0 comments on commit c98e722

Please sign in to comment.