vim-polyglot
vim-polyglot copied to clipboard
Fixed runtimepath resolving
Vim-polyglot changes runtimepath
, but...
- In Windows,
resolve()
does not do full normalization. Therefore, the path of vim-polyglot is not filtered, and registered more than once. ex.)runtimepath
=>
Fix) SubstituteC:\Users\alice\.config\vim C:/Users/alice/.vimplugins/vim-polyglot C:\Users\alice\.vimplugins\vim-polyglot C:\tools\vim\vim82 C:\Users\alice\.vimplugins\vim-polyglot/after C:/Users/alice/.vimplugins/vim-polyglot/after C:\Users\alice\.config\vim/after
\
to/
after resolved. - Rewriting the runtimepath has too many side effects. ex.) Conflicts occur when the plugin-manager manages the paths. Fix) Resolved paths are used only for matching, and the original path representation is preserved.
- Rewriting the runtimepath has too many side effects. ex.) Conflicts occur when the plugin-manager manages the paths. Fix) Resolved paths are used only for matching, and the original path representation is preserved.
I ran into this issue when using the Shougo/dein.vim package manager. dein.vim needs the index of its cache in the rtp to manage things. As soon as vim-polyglot is sourced (editing the rtp) dein.vim breaks as it no longer is able to find the index of its cache.
In my case I symlinked the cache to a tmpfs. vim-polyglot's resolve() rtp editing changes /home/browser/.vim/plugged/.cache/vimrc/.dein
to /tmp/.vimcachebrowser/vimrc/.dein
and dein.vim can't index /home/browser/.vim/plugged/.cache/vimrc/.dein
within the rtp anymore and critical functionality breaks.
This PR fixes the issue on my Debian system.
I think this PR also fixes #769, who questions:
Is it necessary to resolve() each of the paths in the runtime path?