From 4e3a973f85bd2393009d495ecfd6c058345309d4 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 29 Dec 2022 08:21:22 +0100 Subject: [PATCH] fix(rtp): correct order of adding to rtp. Fixes #226 --- lua/lazy/core/config.lua | 2 +- lua/lazy/core/loader.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazy/core/config.lua b/lua/lazy/core/config.lua index 12610cf..f85e5c1 100644 --- a/lua/lazy/core/config.lua +++ b/lua/lazy/core/config.lua @@ -183,9 +183,9 @@ function M.setup(spec, opts) if M.options.performance.rtp.reset then vim.opt.rtp = { M.me, + vim.fn.stdpath("config"), vim.env.VIMRUNTIME, vim.fn.fnamemodify(vim.v.progpath, ":p:h:h") .. "/lib/nvim", - vim.fn.stdpath("config"), vim.fn.stdpath("config") .. "/after", } end diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index 3594114..b17eac0 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -172,7 +172,7 @@ function M._load(plugin, reason) Util.track({ plugin = plugin.name, start = reason.start }) Handler.disable(plugin) - vim.opt.runtimepath:prepend(plugin.dir) + vim.opt.runtimepath:append(plugin.dir) local after = plugin.dir .. "/after" if vim.loop.fs_stat(after) then vim.opt.runtimepath:append(after)