Weird behaviour in code Completion #4234
Unanswered
FlorianPoessl
asked this question in
Q&A
Replies: 1 comment
-
I "fixed" it myself. Because of another issue i just always added the current input text at the front of the filterText of my suggestions and this also solved my slash problem |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I implemented a relatively complex code completion where the suggestions are loaded based on what you type.
Let's say the suggestions are stored in a database and there are about a million of them.
What currently works is, that whenever I am typing, a request is sent to my backend which returns all the suggestiosn which include the typed word.
I now found a "problem" with forward slashes. Some of my CompletionItems include forward-slashes. They get included when I don't type a slash in the search string. Let's say i have one suggestion ABC/12. I type ABC in the editor and all suggestions are loaded including ABC/12. If I now extend my search to ABC/1, my backend returns the correct results and my wanted result is in the completion items. However it is not displayed in the editor. First I thought about the filtering but I changed my wordPattern so that a forward slash doesn't split a word anymore. The Editor now correctly finds my word with the "getWordUntilPosition" method. Does the filter method from the suggestions not use "getWordUntilPosition"?
All other special characters seem to be working, only the forward slash shows no suggestions, even if i return the correct suggestions.
Am I missing something with the filtering of the suggestions?
I also tried to set the filterText from my CompletionItems to "ABC12" by removing all forward slashes.
Beta Was this translation helpful? Give feedback.
All reactions