junegunn / vim-plug

:hibiscus: Minimalist Vim Plugin Manager
https://junegunn.github.io/vim-plug/
MIT License
33.7k stars 1.9k forks source link

(Re)load *.lua in addition to *.vim #1257

Closed liskin closed 5 months ago

liskin commented 8 months ago

When a plugin is installed and before post-install/update hooks are executed, it's necessary to (re)load the plugin. This is being done in s:load_plugin: https://github.com/junegunn/vim-plug/blob/ca0ae0a8b1bd6380caba2d8be43a2a19baf7dbe2/plug.vim#L439-L441 Unfortunately, it only loads *.vim, but there are neovim plugins out there which only have .lua in plugin/, such as https://github.com/nvim-treesitter/nvim-treesitter. This causes issues like https://github.com/nvim-treesitter/nvim-treesitter/issues/5536, https://github.com/junegunn/vim-plug/issues/1207. Some plugins work around it by including a dummy plugin/xxx.vim that loads the .lua.

It'd be good if vim-plug was made neovim-aware and (re)loaded lua plugins as well. (Note there are a few other places in plug.vim that may need an additional *.lua.)

tracyone commented 8 months ago

Is this pr https://github.com/junegunn/vim-plug/pull/1157 solve your problem?

liskin commented 8 months ago

Is this pr #1157 solve your problem?

Unfortunately not: https://github.com/junegunn/vim-plug/pull/1157#issuecomment-1809226110

(Let's continue the discussion there.)

junegunn commented 5 months ago

1157 is merged with your suggested fix. Please let me know if it doesn't work as expected. Thanks!