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

provideinlinecompletionitems is getting triggered on every keystroke. #819

Open
chandrap opened this issue Feb 3, 2023 · 4 comments
Open
Assignees

Comments

@chandrap
Copy link

chandrap commented Feb 3, 2023

provideinlinecompletionitems of a vscode extension that provides completions is being triggered on every keystroke. Is there a way to configure the trigger time after certain debounce time (say 300ms) instead of every keystroke?

Any idea why the debounce (https://github.com/microsoft/vscode/blob/e15b7b08a906b1e974a6a8bbd801c7c6863f7a2b/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.ts#L47) is not enforced here?

@hediet
Copy link
Member

hediet commented Feb 28, 2023

you can just wait for some time and check the cancelation token.

@Zane-XY
Copy link

Zane-XY commented Aug 24, 2023

Is the debounce threshold adjustable by the user? @hediet

@hediet
Copy link
Member

hediet commented Aug 24, 2023

Is the debounce threshold adjustable by the user?

It is not.

@Zane-XY
Copy link

Zane-XY commented Aug 24, 2023

It makes sense to allow extension developer to adjust this debounce setting right? The completion provider service is likely to be flooded from the short debounce intervals. It should allow the extension developer to limit how frequent their provider is called. @hediet

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

3 participants