tsuquyomi icon indicating copy to clipboard operation
tsuquyomi copied to clipboard

E121: Undefined variable: g:tsuquyomi_javascript_support with `syntax on` before `filetype plugin on`

Open kevinoid opened this issue 1 year ago • 0 comments

With Neovim v0.7.2 and tsuquyomi master (8f6e246), if syntax on occurs before filetype plugin on in vimrc/init.vim, an error occurs. To reproduce:

cat >vimrc <<'VIMRC'
let &packpath = expand('<sfile>:p:h')
syntax on
filetype plugin on
VIMRC
mkdir -p pack/foo/start
git -C pack/foo/start clone https://github.com/Quramy/tsuquyomi.git
nvim -u vimrc file.js

Which produces the following errors:

Error detected while processing /tmp/tmp.Tw69eTNqLR/pack/foo/start/tsuquyomi/ftplugin/javascript/tsuquyomi.vim:
line    8:
E121: Undefined variable: g:tsuquyomi_javascript_support
Error detected while processing function vital#of:
line    4:
E605: Exception not caught: vital: version file not found: tsuquyomi
E605: Exception not caught: vital: version file not found: tsuquyomi
Error detected while processing /tmp/tmp.Tw69eTNqLR/pack/foo/start/tsuquyomi/ftplugin/javascript/tsuquyomi.vim:
line   12:
E171: Missing :endif
Error detected while processing function <SNR>1_LoadFTPlugin:
line   17:
E170: Missing :endfor
Error detected while processing /usr/share/nvim/runtime/syntax/syntax.vim:
line   42:
E171: Missing :endif

I bisected the regression to 13efb824a8312bffe5d7289098419ef7e75564ff from https://github.com/Quramy/tsuquyomi/pull/80

Thanks, Kevin

kevinoid avatar Aug 03 '22 16:08 kevinoid