Replies: 3 comments 5 replies
-
Have you tried the |
Beta Was this translation helpful? Give feedback.
-
That's an interesting feature, but what kind of specifications are you envisioning for it? When is the cache for the completion results expected to be updated? |
Beta Was this translation helpful? Give feedback.
-
I think this is niche enough that it should be implemented by the source directly instead of by blink.cmp. You could implement this yourself using the sources = {
providers = {
lbdb = {
overrides = {
get_completions = function(source, ctx, callback)
if check_if_cached_value_is_valid() then
callback(cached_response)
return
end
return source:get_completions(ctx, function(response)
cached_response = response
callback(response)
end)
end
}
}
}
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am dealing with a slow source (
cmp-lbdb
viablink.compat
). As a consequence, completion is mostly useless as it takes 3–4 seconds for the pop-up to pop up.This made me wonder: could
blink.cmp
learn/be taught to cache results provided by sources? I envision a configuration item per source/provider that takes an integer to specify the number of seconds to hold the results in memory.What do you think about this idea?
Beta Was this translation helpful? Give feedback.
All reactions