CodeCompletion not execute after set language of LanguageTextField
Answered
Please see the following code, if I set PlainTextLanguage.INSTANCE as the language, codeCompletion will work, but if I set Json5Language.INSTANCE
, codeCompletion not work. It always show no suggestions.
So how to make codeCompletion work even I set Json5Language.INSTANCE
as the language
TextFieldWithAutoCompletion.StringsCompletionProvider completionProvider = new com.intellij.ui.TextFieldWithAutoCompletion.StringsCompletionProvider(Lists.newArrayList("a", "b"), AllIcons.Nodes.Method);
new com.intellij.ui.LanguageTextField(Json5Language.INSTANCE,project,"",completionProvider,false);
IDEA: 2023.3
Please sign in to leave a comment.
The code doesn't compile. Please post the actual working snippet of your issue.
About missing completion, it might be that builtin JSON completion providers interfere here.
Full demo code