matchfuzzy seems to block a little too long when the list is bit too big.
I would like a feature to workaround the issue.
Describe the solution you'd like
async support, something like matchfuzzy_async(str, list, callback, timeout)
The underlying function would create a thread, monitor the status periodically until timeout, if success call the callback in the main thread, with the result and the list.
Partial response support. matchfuzzy_limit(str, list, max_match_num)
fuzzymatch would stop searching for matches once max_match_num is found.
Describe alternatives you've considered
job_start and use other fuzzy finder process. it works but it feels bit of a waste if there is builtin function.
Additional context
I don't know anything about vim architecture or design policy. Please feel free to close the issue if it's not feasible or etc. I'm especially interested in solution 1. 2 is nice to have if 1 is supported to make the callback happen faster.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Ok. Even though I wish there'd be some asynchronous vim functions in addition to job_start, please feel free to close the issue. sounds like multiprocess is the way for heavy vim plugin by design. Thanks for explaining!
Using a job with a channel is the current solution to this. It's a bit of work to set it up, but has the advantage that the job can die or get stuck without making Vim unusable. Also, it allows for your custom solution without changing the Vim core.
Closed #8359.