vscode: If Intellicode Whole Line Completions are displayed, the suggestions widget does not open
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: 1.60.0-insider (user setup)
- OS Version: Windows_NT x64 10.0.19043
- List of extensions that you have installed: Visual Studio IntelliCode Completions
Steps to Reproduce:
-
Open the attached .txt file, convert it to a typescript .ts file main.txt
-
In line 5, type
s=
and you should see a gray text IntelliCode completion. -
When you type what the completion shows, and get to typing a dot, “.”.
-
When you type a “.”, it is expected you see the suggestions widget. But the suggestions widget does not show up in the presence of gray text completion.
-
GIF -
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 14
- Comments: 62 (32 by maintainers)
Hey all, I wanted to share my thoughts as a user who’s been struggling with this problem for a while now. I’ve mainly felt this pain when using VS Code with TypeScript IntelliSense and Copilot. I was referred here from https://github.com/microsoft/vscode/issues/157675.
I’ve found that IntelliSense and Copilot inline suggestions serve very different purposes in my coding flow. IntelliSense tells me what’s possible while Copilot tells me a best guess solution. I use IntelliSense when I’m not totally sure what I want to do but I want to see what my options are. I use Copilot when I know what I want but I don’t want to type it out. IntelliSense is like searching documentation intersected with the knowledge of the type system. Copilot is like pairing with someone who knows you so well they can finish your sentences for you.
Given that, my ideal behavior would be:
This would allow me to keep relying on Copilot to help speed up my typing but have a seamless way to indicate to VS Code when I’m interested in IntelliSense (typing a dot). (There are also other IntelliSense trigger characters where it would be useful to hide Copilot - e.g. typing an opening quote mark in a place where the type system knows a union of strings is being used.)
A few thoughts on other suggestions from this thread:
I’m sure I have some blind spots as I’m just one user with a specific use case, but hopefully this feedback can help as you keep working on this problem.
I don’t see this mentioned anywhere here but if anyone is looking for a short-term workaround, you can manually trigger IntelliSense with a keyboard shortcut:
Ctrl + space
.Just stumbling upon this thread after trying out Copilot with Golang in VSCode for a few weeks now. I think @jonahkagan did a good job of outlining what an intuitive behavior should be, at least for my workflow. The Copilot suggestions are great most of the time but when I hit certain trigger points (such as a dot) I nearly always want to see what my valid available options are and select from them, rather than have a suggestion that may not be valid.
Maybe it’s just me though. Just one more data point.
This might work for some people, personally I’ve gotten used to IntelliSense suggestions coming up automatically at certain points without having to remember to hit another key.
What I’d really like to see are Copilot suggestions appearing in the intellisense dropdown, with configuration options on how many to show, the position in the list to use, etc (e.g., always insert the top copilot suggestion at the top, then N intellisense results, then Y copilot results, then the rest of intellisense). I think it would be worth re-opening this or creating a new issue to that end.
The real issue with the copilot UI is that it is fighting the already-mature intellisense dropdown rather than having suggestions appear there.
Just gonna drop this here for Copilot users:
These are the keybindings I use with vscode which really work great for me and solves this issue for me.
The important one is
alt+down
, this will show the suggestions (there is a default shortcut for that, but at least on a swiss keyboard it is HORRIBLE). Andalt+down
is just very intuitive for me -> open the dropddown.The other two are to cycle through the copilot suggestions of you are not happy with the suggestion
@hediet Thank you for continuing to work with us on this! For IntelliCode, this is the behavior we want. If the prefix of the inline prediction is in the suggestions widget, that prefix is preselected in the suggestions widget. If it’s not in the suggestions widget, the inline prediction disappears.
@isidorn Trying the new behaviour and it seems to be still broken, if copilot suggestion kicks in before I hit the
.
, LSP suggestions are not shownAny idea what could be wrong?
env:
editor.inlineSuggest.suppressSuggestions: false
After discussing with @isidorn, we suggest the following:
Early prototype:
@juihanamshet1 @Krzysztof-Cieslak @orph what do you think about this? The suggest widget would no longer hide, but the inline suggestion is preselected, so that the ghost text does not disappear.
I’ve set
"editor.inlineSuggest.suppressSuggestions": false
, and when tying a new word, it seems to work fine, but it still suppresses after adding a dot. With copilot enabled:With copilot disabled:
@isidorn There are still times when I expect IntelliCode to suggest methods when I hit a dot, but only CoPilot’s suggestions appear.
I have attempted this on both VSCode 1.78.2 (system setup) and 1.79.0-insider (system setup), along with GitHub Copilot Nightly v1.86.118. All plugins are up-to-date.
@isidorn I successfully get the suggestions dropdown (LSP, etc) while the copilot ghost text is shown in the background. Behavior seems to match the preview in https://github.com/microsoft/vscode/issues/131940#issuecomment-914370898.
I can hit
enter
ortab
to accept the suggestion, thentab
again to accept the copilot ghost text. (only needing onetab
if no suggestion is shown).IMO, the best user experience would be having copilot code as list items in the suggestions window. Combine that with the suggestion-preview setting and you’d be able to mix and match LSP and Copilot suggestions.
Take a look at this neovim plugin to see examples of this exact behavior. It works very well!
When copilot is enable in the project, NO other suggestion is showns except for the inline suggestion created by Copilot.
@hediet @isidorn should I file another issue to get this comment implemented? https://github.com/microsoft/vscode/issues/131940#issuecomment-931815784
We’d really like to have this as a UX improvement over the current situation to show the popup list more often when the inline suggestion isn’t a good match… ideally in the november VScode release.
I think there are two main questions here:
Can you set
editor.inlineSuggest.allowQuickSuggestions
tofalse
and check if that is the desired behavior? Also pinging @juihanamshet1That way, trigger characters still cause the autocomplete to show up while it does not show up when simply typing letters:
I think this would address all issues & feature requests.
If you are okay with that, we can set
allowQuickSuggestions
tofalse
by default.A “valid” inline completion item will only be not shown with this new behavior if no proper prefix of it is suggested by the autocomplete. If no prefix of the inline completion is a valid auto-complete item, I think the inline completion is very likely to cause compile errors.