diff options
author | Matthew Lemon <y@yulqen.org> | 2024-02-28 08:30:12 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-02-28 08:30:12 +0000 |
commit | dbea6ecfcc50e3488173bc56dc84139bd370f8ac (patch) | |
tree | 44cda00dd05545a083f7fdb09fab98c2264d129d /vim/autoload | |
parent | 9c6146889232a009e1432392ba09a85d11ffb9e9 (diff) |
Some new autoload stuff for vim from plug I think
Diffstat (limited to 'vim/autoload')
-rw-r--r-- | vim/autoload/plug.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vim/autoload/plug.vim b/vim/autoload/plug.vim index 9c3011f..71486bc 100644 --- a/vim/autoload/plug.vim +++ b/vim/autoload/plug.vim @@ -391,6 +391,9 @@ function! plug#end() if !empty(types) augroup filetypedetect call s:source(s:rtp(plug), 'ftdetect/**/*.vim', 'after/ftdetect/**/*.vim') + if has('nvim-0.5.0') + call s:source(s:rtp(plug), 'ftdetect/**/*.lua', 'after/ftdetect/**/*.lua') + endif augroup END endif for type in types @@ -438,6 +441,9 @@ endfunction function! s:load_plugin(spec) call s:source(s:rtp(a:spec), 'plugin/**/*.vim', 'after/plugin/**/*.vim') + if has('nvim-0.5.0') + call s:source(s:rtp(a:spec), 'plugin/**/*.lua', 'after/plugin/**/*.lua') + endif endfunction function! s:reload_plugins() @@ -655,6 +661,9 @@ function! s:lod(names, types, ...) let rtp = s:rtp(g:plugs[name]) for dir in a:types call s:source(rtp, dir.'/**/*.vim') + if has('nvim-0.5.0') " see neovim#14686 + call s:source(rtp, dir.'/**/*.lua') + endif endfor if a:0 if !s:source(rtp, a:1) && !empty(s:glob(rtp, a:2)) @@ -1031,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 |