Custom Completion provider with slashes
Answered
I want to implement a custom completion provider. The provided items are in a path-style-format like "/this/is/a/path". Unfortunately when completing an incomplte path like "/this/is/a" it results in "//this/is/a/path". Note the double slash at the beginning.
I looked into the code and it seems that this is a hardcoded behaviour of intellij, which is ignoring non-javaidentifier-characters in com.intellij.codeInsight.completion.CompletionData, method findPrefixDefault with the NOT_JAVA_ID pattern.
Is there a way to prevent this behaviour? And, since the class is scheduled for removal, is this behaviour going to change in 2021.1?
Please sign in to leave a comment.
Could you please share a snippet of your code? What API are you using exactly to add your completion variants?