cmp-vimtex icon indicating copy to clipboard operation
cmp-vimtex copied to clipboard

parser.timer breaks blink.cmp

Open OmegaLambda1998 opened this issue 1 year ago • 1 comments

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.

OmegaLambda1998 avatar Nov 13 '24 04:11 OmegaLambda1998

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.

micangl avatar Nov 23 '24 09:11 micangl