From c98e722fa41e0aa94809e44edf859216afedd8ad Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 3 Dec 2022 21:08:35 +0100 Subject: [PATCH] fix: always add config/after to rtp --- lua/lazy/core/config.lua | 9 +++++---- lua/lazy/core/loader.lua | 4 ---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 56d8352..1fc1936 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -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 }, @@ -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, } @@ -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 diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index af36abc..d57ccc3 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -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 @@ -52,8 +50,6 @@ function M.init_plugins() M.load(plugin, { start = "startup" }) end end - Util.track() - Util.track() M.init_done = true end