Visual Studio’s IntelliSense list can now steer GitHub Copilot code completions.
TL:DR GitHub Copilot and Visual Studio’s built-in AI assistance features are now better together. With the latest version of GitHub Copilot, changing your selection in Visual Studio’s IntelliSense list steers the GitHub Copilot with additional context about your code, so you can easily explore the single and multi-line code completions to get just the code you need.
Press TAB to accept the IntelliSense member, then TAB again to accept the Copilot prediction.
With the latest release (version 1.84+), Copilot predictions are not only visible when the IntelliSense list when the IntelliSense is open, but your IntelliSense selection also steers the prediction offered by Copilot. This helps you explore and get just the code completion you’re looking for. It’s particularly helpful in combination with the starred completions that Visual Studio’s build-in IntelliCode AI provides with member ranking in the IntelliSense list.
Prior to this release, users of Copilot in Visual Studio had to choose between accepting a Copilot completion or opening the IntelliSense list, at which point the Copilot prediction would no longer show.
Press Left CTRL to hide the IntelliSense list or accept the prediction to understand the code with syntax highlighting/IntelliSense.
To preview the prediction, you can either…
1. Press `Left CTRL` button to hide the IntelliSense menu if they want to peek at a multi-line prediction
2. Accept the prediction to understand the proposed code with the help of syntax highlighting and tooltip that appears when hovering on a symbol.
Developers may need to manually update to version 1.84 of Copilot.
If you have version 1.77 or earlier of GitHub Copilot in Visual Studio, your extension will not manually update.
In Visual Studio, click Extensions > Extension Manager > Updates to get the latest version of GitHub Copilot.
Want to learn more about GitHub Copilot?
To get started with GitHub Copilot, make sure you are on version 17.4.4 or later of Visual Studio 2022. Then check out this guide.
Copilot is free for GitHub verified students and maintainers of popular open-source projects.