You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incomplete suggestion results cause re-triggering when typing w/o further context. #28400
We do not register for a textDocument/completion callback when semicolon is typed. We think this is a VS Code bug with the "editor.quickSuggestions" setting. It is popping up after semicolon is typed instead of waiting for a new line. I repro this on Windows too.
We think this is a VS Code bug with the "editor.quickSuggestions" setting.
Bob Brown (@bobbrow) What makes you think this? Quick-suggestions has nothing to do with trigger characters which will always go straight to your provider. Quick-suggestios is about suggesting while you type words. Please share your word definition, it might include ;
Our word definition? Do you mean the C++ grammar? I can go take a look and see if something changed there. What's strange is that we get a textDocument/completion event from VS Code only once the ; is typed. It's not a continuation of the previous word/symbol.
Johannes Rieken (@jrieken) Bob and I have both reproed the bug where the quickSuggestion popup occurs after the semicolon, but the repro appears to be random (timing related?) and we don't yet know a good way to force a repro. We don't think our extension is causing the issue.
This bug happened every time, but only in a particular directory, even if I cleaned all files within it (including .vscode), and created new 1.cpp. It didn't repro for copy of this dir. I deleted it and created the dir with the same name, and now it doesn't repro. Hence, it seems like this bug depends on time of creation of directory.
Ok, I'd go for a higher limit to begin with and see how well or not that goes. With 10000 it should still be OK, the 40000 maybe a little slower. The rendering is all virtualised, the expensive bit is data serialisation and filtering/scoring. I'd give it a try, everyone would benefit if you guys can uncover some hidden perf issues with this.
We might be able to fix this via saving the anchor position when an incomplete result is returned and clearing the state when the selection changes to a different line/file, although it might not solve all scenarios.
It could work - the UI only allows to invoke IntelliSense in one editor at a time but your provider can also be asked via API-commands. But the assumption will hold for most cases...
Another thing you could try is to filter down the list on the server, e.g. when having a huge result set and with a forgiving continuous substring matcher.
Johannes Rieken (@jrieken) We're hitting problems when incomplete == true -- there appears to be no way to cancel the completion when a ";" or other identifier breaking character is is encountered, even if we save the anchor position. The result is that it shows "No suggestions" instead of disappearing. Also, when the user hits Esc to cancel the completion popup, we also get no cancelRequest set, so we can't reset the "anchor" correctly. It sounds like you're saying this "incomplete" parameter is not really usable in a correct way? Or are we misunderstanding something?
Sean McManus (@sean-mcmanus) we don't have enough context from vscode to do anything right now besides increasing our upper limit. We can try 10000 and see if that helps.
Ok, plan for June is to cancel suggestions when a result is marked as incomplete and when the cursor isn't on a word anymore. That might discriminate suggestions that contain non-word-characters and aren't there yet (still in the incomplete portion) but we believe that's the smaller problem.
I have pushed a change that implements aforementioned behaviour. Closing this issue, exposing more information to suggestion providers is tracked here: #752.
Activity
ramya-rao-a commentedon Jun 12, 2017
This issue was moved to microsoft/vscode-cpptools#818
bobbrow commentedon Jun 12, 2017
Hi there,
We do not register for a textDocument/completion callback when semicolon is typed. We think this is a VS Code bug with the
"editor.quickSuggestions"setting. It is popping up after semicolon is typed instead of waiting for a new line. I repro this on Windows too.Please reopen and investigate.
jrieken commentedon Jun 13, 2017
Bob Brown (@bobbrow) What makes you think this? Quick-suggestions has nothing to do with trigger characters which will always go straight to your provider. Quick-suggestios is about suggesting while you type words. Please share your word definition, it might include
;bobbrow commentedon Jun 13, 2017
Our word definition? Do you mean the C++ grammar? I can go take a look and see if something changed there. What's strange is that we get a textDocument/completion event from VS Code only once the
;is typed. It's not a continuation of the previous word/symbol.jrieken commentedon Jun 13, 2017
No, not the grammar but the
wordPatternextensions either define via an API call or via the language-config filejrieken commentedon Jun 13, 2017
Actually, this doesn't repro for me... Yuriy Baranov (@yurriy) Please provide more details
bobbrow commentedon Jun 13, 2017
We don't set a LanguageConfiguration anywhere in our extension. I honestly didn't know such a thing existed.
sean-mcmanus commentedon Jun 13, 2017
Johannes Rieken (@jrieken) Bob and I have both reproed the bug where the quickSuggestion popup occurs after the semicolon, but the repro appears to be random (timing related?) and we don't yet know a good way to force a repro. We don't think our extension is causing the issue.
yurriy commentedon Jun 14, 2017
This bug happened every time, but only in a particular directory, even if I cleaned all files within it (including .vscode), and created new 1.cpp. It didn't repro for copy of this dir. I deleted it and created the dir with the same name, and now it doesn't repro. Hence, it seems like this bug depends on time of creation of directory.
jrieken commentedon Jun 14, 2017
Yuriy Baranov (@yurriy) what is the list of snippets you have? what is the list of suggestion you see? can you attach a screen shot?
27 remaining items
jrieken commentedon Jun 22, 2017
Ok, I'd go for a higher limit to begin with and see how well or not that goes. With 10000 it should still be OK, the 40000 maybe a little slower. The rendering is all virtualised, the expensive bit is data serialisation and filtering/scoring. I'd give it a try, everyone would benefit if you guys can uncover some hidden perf issues with this.
It could work - the UI only allows to invoke IntelliSense in one editor at a time but your provider can also be asked via API-commands. But the assumption will hold for most cases...
Another thing you could try is to filter down the list on the server, e.g. when having a huge result set and with a forgiving continuous substring matcher.
sean-mcmanus commentedon Jun 27, 2017
Johannes Rieken (@jrieken) We're hitting problems when incomplete == true -- there appears to be no way to cancel the completion when a ";" or other identifier breaking character is is encountered, even if we save the anchor position. The result is that it shows "No suggestions" instead of disappearing. Also, when the user hits Esc to cancel the completion popup, we also get no cancelRequest set, so we can't reset the "anchor" correctly. It sounds like you're saying this "incomplete" parameter is not really usable in a correct way? Or are we misunderstanding something?
bobbrow commentedon Jun 27, 2017
Sean McManus (@sean-mcmanus) we don't have enough context from vscode to do anything right now besides increasing our upper limit. We can try 10000 and see if that helps.
jrieken commentedon Jun 28, 2017
Ok, plan for June is to cancel suggestions when a result is marked as incomplete and when the cursor isn't on a word anymore. That might discriminate suggestions that contain non-word-characters and aren't there yet (still in the incomplete portion) but we believe that's the smaller problem.
with incomplete suggest results, only re-trigger when still typing a …
jrieken commentedon Jun 28, 2017
I have pushed a change that implements aforementioned behaviour. Closing this issue, exposing more information to suggestion providers is tracked here: #752.
bobbrow commentedon Jun 28, 2017
Thanks Johannes Rieken (@jrieken)!