vim-plug icon indicating copy to clipboard operation
vim-plug copied to clipboard

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

Open liskin opened this issue 1 year ago • 2 comments

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.)

  • Type:
    • [X] Bug
    • [ ] Enhancement
    • [ ] Feature Request
    • [ ] Question
  • OS:
    • [X] All/Other
    • [ ] Linux
    • [ ] macOS
    • [ ] Windows
  • Vim:
    • [ ] Terminal Vim
    • [ ] GVim
    • [X] Neovim

liskin avatar Nov 09 '23 13:11 liskin

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

tracyone avatar Nov 13 '23 01:11 tracyone

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.)

liskin avatar Nov 13 '23 22:11 liskin

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

junegunn avatar Feb 24 '24 14:02 junegunn