From 36a91320f9ff4f877f09ac3a52c6a26860da047a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 28 May 2023 11:02:35 +0200 Subject: [PATCH] fix(loader): don't run ftdetect twice for paths already on the rtp during startup. Fixes #839 --- lua/lazy/core/loader.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazy/core/loader.lua b/lua/lazy/core/loader.lua index 25f1c57..3065040 100644 --- a/lua/lazy/core/loader.lua +++ b/lua/lazy/core/loader.lua @@ -122,6 +122,9 @@ function M.startup() Util.track({ start = "rtp plugins" }) for _, path in ipairs(rtp) do if not path:find("after/?$") then + -- these paths don't will already have their ftdetect ran, + -- by sourcing filetype.lua above, so skip them + M.did_ftdetect[path] = true M.packadd(path) end end