How to trigger VSCode CompletionItemProvider only when a keyboard shortcut is pressed?

169 Views Asked by At

I currently have a working VSCode extension for inline completion capabilities, but I want to make it such that the inline completion feature is only triggered upon pressing a keyboard key (eg TAB). I have researched online, and it appears that a CancellationToken is one of the parameters in the provideInlineCompletionItems function within CompletionItemProvider. However, I am not sure how to set the cancellation status of the token to True when the keyboard shortcut is not pressed. Any help will be greatly appreciated. Thank you!

0

There are 0 best solutions below