From 2f8f04cf79f424aab8c2372d8e0b89099e3dba65 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 24 Feb 2024 23:02:38 +0900 Subject: [PATCH] Reset &rtp before 'do' to invalidate Neovim cache of loaded Lua modules --- plug.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plug.vim b/plug.vim index a4901e4..71486bc 100644 --- a/plug.vim +++ b/plug.vim @@ -1040,6 +1040,11 @@ function! s:is_updated(dir) endfunction function! s:do(pull, force, todo) + if has('nvim') + " Reset &rtp to invalidate Neovim cache of loaded Lua modules + " See https://github.com/junegunn/vim-plug/pull/1157#issuecomment-1809226110 + let &rtp = &rtp + endif for [name, spec] in items(a:todo) if !isdirectory(spec.dir) continue