Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_on_every_keystroke clarification #18

Closed
mystilleef opened this issue Nov 21, 2021 · 1 comment
Closed

run_on_every_keystroke clarification #18

mystilleef opened this issue Nov 21, 2021 · 1 comment

Comments

@mystilleef
Copy link

If I set run_on_every_keystroke to false, then how often is the server queried? Is it queried on CursorHoldI? The docs don't explain this behavior. I know this makes the queries less aggressive, but how much so?

@tzachar
Copy link
Owner

tzachar commented Nov 21, 2021

This is related to cmp's behaviour. Lets say you input an 'a', and assume you are using the buffer source. The buffer source will then return all identifiers starting with an 'a'. When you then input the next character, cmp does not need to ask buffer for different completion items, it just needs to filter the previous results to those having 'ab' (its actually doing a fuzzy filter here).
However, TabNine can generate different completion items based on the new prefix 'ab', hence the run_on_every_keystroke.
If you set it to false, your experience with TabNine's completion would suffer.

Personally, I think TabNine does not lag behind the other sources and is very responsive. That is why run_on_every_keystroke is set to true by default.

Maybe we should add this to the README.

@tzachar tzachar closed this as completed Nov 21, 2021
tzachar added a commit that referenced this issue Nov 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants