FS#71404 - [neovim] vim plugins and runtimepath ordering
Attached to Project:
Community Packages
Opened by brisvag (brisvag) - Wednesday, 30 June 2021, 13:50 GMT
Last edited by Daniel M. Capella (polyzen) - Sunday, 16 July 2023, 06:44 GMT
Opened by brisvag (brisvag) - Wednesday, 30 June 2021, 13:50 GMT
Last edited by Daniel M. Capella (polyzen) - Sunday, 16 July 2023, 06:44 GMT
|
Details
This is somewhat related to the other neovim bug report
currently open (https://bugs.archlinux.org/task/65616), but
no strictly the same.
`vim` and `neovim` plugins are supposed to be largely compatible, which is why `/usr/share/vim/vimfiles` is appended to the end of the runtime path by the current neovim `pkgbuild`. However, since this directory only contains plugin-related files, I would think that this should appear in the runtime path *before* `/usr/share/nvim/runtime`. Is there a reason why this is not the case? I recently encountered this issue (https://aur.archlinux.org/packages/vim-vimtex-git/#comment-815060), which seems to be caused by this ordering problem, and is likely to appear with any other package that overrides a file that `nvim` also ships. It would be better to solve this at this level, rather than forcing the existence of duplicate plugins for `vim` and `neovim` or having people edit their runtimepath manually. |
This task depends upon
Closed by Daniel M. Capella (polyzen)
Sunday, 16 July 2023, 06:44 GMT
Reason for closing: Not a bug
Additional comments about closing: Seems the ordering was deemed appropriate. Please open another issue regarding neo/vim plugin specific locations if that is still wanted.
Sunday, 16 July 2023, 06:44 GMT
Reason for closing: Not a bug
Additional comments about closing: Seems the ordering was deemed appropriate. Please open another issue regarding neo/vim plugin specific locations if that is still wanted.
FS#65616here, a few random comments:* Neovim is not a drop in replacement for vim. It can't be assumed to be so.
* Plugins that work for vim overwhelmingly also work for neovim.
* The reverse is not true, many plugins are neovim specific and won't work in plain vim.
Hence including the vim rtp before neovim's own distribution files is a really bad idea, plugins may be trying to fixup something in vim that does not need fixing up in neovim.
I would propose a further split: have vim & neovim specific plugin locations. Have vim only look at the former by default (plugins, then itself). Have neovim look at both, but in a different order (it's own plugins, then itself, then vim plugins).
Packages that provide neovim plugins could put them where vim wouldn't be tempted to trip over them, while still being first priority in the rtp for neovim.