neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 3f34f083db0694032477c8fa6a1ca85c52d59bec
parent 28e2a5c1513dd3adb6fc085a92f66bf7d7786317
Author: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Date:   Tue, 29 Jul 2025 16:06:40 +0300

fix(pack): ignore 'loadplugins' when sourcing 'after/plugin' scripts

Problem: Sourcing of 'after/plugin' scripts depends on the value of
  'loadplugins' option. It is redundant, as it has effect only during
  startup, while it is combined with `vim.v.vim_did_enter == 1` (i.e.
  "it is after starting up") condition.

Solution: Ignore it.

Diffstat:
Mruntime/lua/vim/pack.lua | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/runtime/lua/vim/pack.lua b/runtime/lua/vim/pack.lua @@ -626,8 +626,7 @@ local function pack_add(plug, load) -- automatically), as `:packadd` only sources plain 'plugin/' files. -- See https://github.com/vim/vim/issues/15584 -- Deliberately do so after executing all currently known 'plugin/' files. - local should_load_after_dir = vim.v.vim_did_enter == 1 and load and vim.o.loadplugins - if should_load_after_dir then + if vim.v.vim_did_enter == 1 and load then local after_paths = vim.fn.glob(plug.path .. '/after/plugin/**/*.{vim,lua}', false, true) --- @param path string vim.tbl_map(function(path)