micangl / cmp-vimtex

Vimtex source for nvim-cmp.
MIT License
87 stars 5 forks source link

parser.timer breaks blink.cmp #28

Open OmegaLambda1998 opened 2 weeks ago

OmegaLambda1998 commented 2 weeks ago

Since parser.timer is a userdata type, it can't be copied, which stops blink.cmp from providing accepting completion items, since it deepcopies those items. If instead of parser.new containing self.timer = timer.new() you could modify parser.start_parsing to be

local t = timer.new()
t:start(0, 50, function()
...
t:stop()
::finish::
end)

Which (I believe) provides the same functionality without carrying the timer around everywhere you go.

micangl commented 6 days ago

Thanks for contributing. Unfortunately, I don't use blink.cmp and, as I really don't have available time at the moment, I won't be able to take a look at this.

If you'd like to open a PR I may do so, though; sorry.