I am creating an inline code completion plugin for vscode.
I am using the InlineCompletionItemProvider to show the inline suggestions.
However, I am making the call to generate suggestion even when an IntelliSense popup is visible. This is an unnecessary call for me as the suggestion I have will not be visible until and unless the user closes the intelliSense popup. I want to reduce this unnecessary cost.
Is there a way to identify whether intelliSense popup is visible or not. So that I can not call inline completions when the popup is visible.
Any help or direction will be much appreciated.
This would be another case where a
getContext()api would be useful - to get current context keys. Because there is asuggestWidgetVisiblecontext key. Unfortunately the request forgetContext()has been mostly shut down. See add getContext command.But you can add your use case here: Lift setContext from a command to proper API which remains open apparently just for
getContext()sincesetContext()has been implemented.