rofl.nvim icon indicating copy to clipboard operation
rofl.nvim copied to clipboard

[WIP] trying out async completion + concurrent sources

Open oberblastmeister opened this issue 4 years ago • 6 comments
trafficstars

oberblastmeister avatar Jan 30 '21 22:01 oberblastmeister

Fuzzy matching currently works and uses the skim algorithm (similar to fzf)! I need to refactor it though. I also added 2 test sources, a counter source which just keeps adding to the counter, and a static source. It will process sources concurrently using tokio tasks and then display them.

oberblastmeister avatar Jan 31 '21 01:01 oberblastmeister

Hmm, I'm not sure I'm ready to merge all of this in :laughing:

I was thinking more originally just pulling out some of the code to make it use tokio, and then we could chat about the other bits one at a time.

I want to sketch out some interfaces first, before writing some code -- I will try and do it some time next week (probably on stream).

I appreciate the thinking and what you've done so far :) Just don't want to get ahead of ourselves. I spent quite a bit of time just sort of doodling for telescope before I made anything serious, so I'm plannin on doing the same here. Hopefully that's OK! :smile:

Let me know your thoughts.

tjdevries avatar Jan 31 '21 05:01 tjdevries

(You can keep adding stuff to the PR as you think about it though)

tjdevries avatar Jan 31 '21 05:01 tjdevries

Its okay, I didn't expect this to get merged. :smile: It was mostly just a proof of concept and a place for me where I could experiment and play with async code, as I haven't done much of it actually. I think that its a great idea for you to doodle some stuff for the interfaces, will definitely try to be on stream. I'll create a separate pr for just tokio.

oberblastmeister avatar Jan 31 '21 13:01 oberblastmeister

I made a pr to update to tokio 1.0

oberblastmeister avatar Feb 06 '21 01:02 oberblastmeister

@oberblastmeister Did you try out async cancelation yet? If the user types, the completion might take too long. Or one could set a time limit how long taking completion sources is allowed to take (or how long to keep them).

matu3ba avatar Aug 11 '21 12:08 matu3ba