You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A plugin I'm using riv.vim is having all after/sytax/*.vim files included by vim-plug when I'm using lazy loading by filetype. My particular issue comes up with:
Plug 'Rykka/riv.vim', { 'for': 'rst' }
let g:riv_python_rst_hl = 1
This causes all the after/syntax/*.vim (eg both python.vim and rst.vim files in its after/syntax folder) to be sourced by vim-plug when opening an .rst file. The second line is needed to enable rst syntax in Python files (and pass a check in its after/syntax/python.vim). The result of sourcing both files is that python.vim also sources rst.vim; resulting in a double-inclusion of rst.vim (which raises an error down the line).
@junegunn Okay, so this would apply to both syntax and after/syntax directories referenced in s:lod_ft. This should give a boost performance as you're only parsing the syntax of the given filetype.
A plugin I'm using
riv.vim
is having allafter/sytax/*.vim
files included by vim-plug when I'm using lazy loading by filetype. My particular issue comes up with:This causes all the
after/syntax/*.vim
(eg bothpython.vim
andrst.vim
files in its after/syntax folder) to be sourced by vim-plug when opening an.rst
file. The second line is needed to enable rst syntax in Python files (and pass a check in itsafter/syntax/python.vim
). The result of sourcing both files is thatpython.vim
also sourcesrst.vim
; resulting in a double-inclusion ofrst.vim
(which raises an error down the line).If not using lazy loading, there's no issue as only the
after/syntax/rst.vim
gets sourced on file open. The globbing at https://github.com/junegunn/vim-plug/blob/master/plug.vim#L424, which is called by line 433, is sourcing all files in a plugin'safter/syntax
directory.So, should vim-plug only source the
after/syntax/<filetype>.vim
when lazy-loading, or is this somethingriv.vim
should be guarding against?I'm using the latest version of vim-plug with VIM - Vi IMproved 7.4 patches: 1-712 on Ubuntu 15.10.
Thanks!
The text was updated successfully, but these errors were encountered: