fix: enable code completion for DocumentEvent only

This commit is contained in:
Carl-Robert Linnupuu 2024-03-28 14:55:52 +02:00
parent 2ad1e4e917
commit 99b5f94dad

View file

@ -52,7 +52,8 @@ class CodeGPTInlineCompletionProvider : InlineCompletionProvider {
}
override fun isEnabled(event: InlineCompletionEvent): Boolean {
return ConfigurationSettings.getCurrentState().isCodeCompletionsEnabled
return event is InlineCompletionEvent.DocumentChange
&& ConfigurationSettings.getCurrentState().isCodeCompletionsEnabled
}
private fun ProducerScope<InlineCompletionElement>.getCodeCompletionEventListener(