rofl.nvim
rofl.nvim copied to clipboard
[WIP] trying out async completion + concurrent sources
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.
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.
(You can keep adding stuff to the PR as you think about it though)
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.
I made a pr to update to tokio 1.0
@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).