These are chat archives for Shougo/dein.vim

23rd
Aug 2017
MiSawa
@MiSawa
Aug 23 2017 02:50 UTC
It looks on_source event is not fired for non-lazy plugins. Is this an intended feature?
Shougo
@Shougo
Aug 23 2017 02:54 UTC
Yes.
                        *dein-options-on_source*
on_source    (List) or (String)
        Load the plugin before the listed plugins are loaded.
        Note: The plugins must be lazy loaded plugins.
Because, the on_source() event slows your startup time.
You can call on_source() manually by dein#call().
MiSawa
@MiSawa
Aug 23 2017 03:01 UTC
Oh sorry, my bad.
I don't find dein#call in :help / autoload/dein.vim. Is that dein#call_hook?
(And I'm guessing that call_hook is the thing to fire hook_*)
Shougo
@Shougo
Aug 23 2017 03:06 UTC
Ah, dein#call_hook().
MiSawa
@MiSawa
Aug 23 2017 03:17 UTC
Hmm... Is there a way to source plugin B before plugin A is loaded (same as A depends B) where we can write the config in B's configuration section?
Shougo
@Shougo
Aug 23 2017 03:19 UTC
on_source
MiSawa
@MiSawa
Aug 23 2017 03:20 UTC
... and applicable for non-lazy?
Shougo
@Shougo
Aug 23 2017 03:20 UTC
Nothing. You must use be lazy.
The source order is complex.
The startuptime is important for me.
MiSawa
@MiSawa
Aug 23 2017 03:21 UTC
Oh I see, I guess I should ... Thank you!!!
Shougo
@Shougo
Aug 23 2017 03:21 UTC
And other plugin managers does not support the feature.
MiSawa
@MiSawa
Aug 23 2017 03:23 UTC
Oh I can't edit message above. *I should trigger something when A is loaded, and add hook on B
May be it's for-me thing, but I think it's good to have that feature for something like unite sources.
I personally don't want to enumerate them to unit's config section.
Shougo
@Shougo
Aug 23 2017 03:28 UTC
I use on_source for it.
MiSawa
@MiSawa
Aug 23 2017 03:32 UTC
That's sounds correct approach. May be I should try make unite lazy.(I didn't investigate my configuration yet, but I got an error so I tried to find a simpler solution.) Anyway, thank you for your quick responses!