Open Jaehaks opened 2 months ago
Thanks for raising the issue! May I ask @benbrastmckie if he is seeing the same output (vimtex
listed twice in CmpStatus
), as I see that he has a similar configuration?
It shouldn't, in any case, interfere with anything.
@micangl Sure, Of course. I checked the config repository of @benbrastmckie. He configured the cmp-vimtex like this,
1) configure cmp-vimtex
in a file vimtex-cmp.lua
separately and use lazy=false
loading
2) use cmp-vimtex
as dependencies of nvim-cmp
without any configuration
I applied above configuraiton before and It worked fine because it only loads once and configuration can be applied.
But The downside is that it makes nvim loading time longer than before because cmp-vimtex
is loaded at startup always with long load time (~200ms)
I want to lazy-load cmp-vimtex
when nvim-cmp is loaded.
But If he set lazy
true in vimtex-cmp.lua
, the vimtex will be called twice as the same with what I said
@Jaehaks Unfortunately, there doesn't seem to be a way with lazy
to call the setup
function before the after/plugin/
files are sourced. This is what happens with the "normal" plugin loading process, and is necessary to keep the source compatible with non-lazy loaders.
At the moment I'm completely swamped so, since this is not a bug which prevents the plugin from working, I'll have to postpone finding a fix, as there doesn't seem to be an immediate one.
Thank you for your efforts,
If I configure cmp-vimex,
CmpStatus
shows me the vimtex sources are duplicated In nvim-cmp lazy.nvim setup, I called the cmp-vimtex plugin as dependencies.Case 1) If I don't configure cmp-vimtex
Cmp-vimtex loaded just once for unused source names (I didn't load this source to confirm how many this source is called just.)![image](https://github.com/micangl/cmp-vimtex/assets/26200835/0bceb0c1-3662-403d-bab8-d65bd19e1ff8)
Case 2) If I configure cmp-vimtex
Cmp-vimtex loaded twice as below![image](https://github.com/micangl/cmp-vimtex/assets/26200835/f52ec0b0-19b8-4f76-a717-65d93bb01fed)
Could you know where the vimtex source are called one more?