tani / vim-jetpack

The lightning-fast plugin manager, alternative to vim-plug
https://gist.asciidoctor.org/?github-tani/vim-jetpack/main//README.adoc&source-highlighter=highlightjs
MIT License
323 stars 32 forks source link

ftdetect doesn't load when install plugin with `on_ft` #115

Closed CoelacanthusHex closed 1 year ago

CoelacanthusHex commented 1 year ago

the ftdetect of the plugin that is loaded on demand through the on_ft setting is not loaded. I don't know if this is expected behavior (it seems to be a loop, the plugin has to be loaded to recognize the filetype, and only loaded if the filetype is recognized), but it clearly affects normal use. If this is expected, then I would like to modify the behavior so that ftdetect is always loaded for plugins with the on_ft option; if this is a bug, please fix it. I don't know if it makes sense to reply to this question here, if not, I'll open a new issue.

Vim version: 9.0.1306 MWE:

packadd vim-jetpack
call jetpack#begin()
call jetpack#add('vim-crystal/vim-crystal', { 'on_ft': ['crystal'] })
call jetpack#end()

Originally posted by @CoelacanthusHex in https://github.com/tani/vim-jetpack/issues/114#issuecomment-1429982741

tani commented 1 year ago

Thank you for reporting this issue. I am pleased to inform you that the issue has been resolved in the current revision. I have tested your configuration on my laptop and can confirm that it is working well. Please feel free to verify it on your end.

CoelacanthusHex commented 1 year ago

It isn't fixed, just because Vim added ftdetect for crystal so my MWE can't check this problem now. https://github.com/vim/vim/commit/7c4516fe93d865f4ef1877181f8156b8b9331856 You can comment this line and check again.

tani commented 1 year ago

Ah. You're right. I got what you mentioned. How about this ?

https://github.com/tani/vim-jetpack/commit/795328f171491671c24a9fcd8342a3a5bccd9d2f

CoelacanthusHex commented 1 year ago

It is fixed now! Thanks!