DEV Community

Cover image for How to get more suggestions from GitHub Copilot
Michelle Duke for GitHub

Posted on

36 3 2 3 2

How to get more suggestions from GitHub Copilot

Have you ever wanted more from GitHub Copilot? Has GitHub Copilot ever made a suggestion where you thought "I wish I had more options?" Good news, you can! GitHub Copilot can provide you with multiple suggestions for your code.

Here's how.

GitHub Copilot suggestions

When you normally use GitHub Copilot, you'll be provided with a suggestion. This is known as "ghost text". You can accept GitHub Copilot's response by pressing ENTER on your keyboard.

GitHub Copilot's ghost text:
GitHub Copilot suggestion

Accepting GitHub Copilot's output:
Accepted code

If you don't like GitHub Copilot's idea, then you can continue to type, or press DELETE on your keyboard.

Wouldn't it be great to be given a few options to chose from when working with GitHub Copilot? Here's how to get more than one idea when using GitHub Copilot.

Get multiple suggestions

    1. When using GitHub Copilot in your editor, instead of waiting for the ghost text to appear, press `CTRL` + `ENTER` on your keyboard (⌘ + `ENTER` on Mac).
    2. Instead of ghost text, you'll see a pop-up window appear. This is called the completions panel. The panel will provide you with up to ten different suggestions.

The completions panel pops up in the GitHub Copilot tab on VS Code:
Completions panel

Up to 10 code blocks will be provided:
GitHub Copilot suggestions

    3. Select the suggestion you like by hovering over the desired code and clicking "Accept Suggestion".

Accepting the suggestion:
Accept solution

Try it out

Open your editor of choice and try it out for yourself. Check out the video tutorial if you want to see GitHub Copilot suggestions in action:

Top comments (4)

Collapse
 
balastrong profile image
Leonardo Montini β€’ β€’ Edited

That's so cool! I think I opened that panel once and I didn't know how, now I'll use it more often :D

By the way I think it's Control+Enter on Mac too... or at least, it is on my Mac :)

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
jon_snow789 profile image
Jon Snow β€’

Ohh
Good Suggestion πŸ‘πŸ‘

Collapse
 
gulshanaggarwal profile image
Gulshan Aggarwal β€’

cool but it takes time in getting of those 10 suggestions.

Feature flag article image

Create a feature flag in your IDE in 5 minutes with LaunchDarkly’s MCP server 🏁

How to create, evaluate, and modify flags from within your IDE or AI client using natural language with LaunchDarkly's new MCP server. Follow along with this tutorial for step by step instructions.

Read full post

πŸ‘‹ Kindness is contagious

Take a moment to explore this thoughtful article, beloved by the supportive DEV Community. Coders of every background are invited to share and elevate our collective know-how.

A heartfelt "thank you" can brighten someone's dayβ€”leave your appreciation below!

On DEV, sharing knowledge smooths our journey and tightens our community bonds. Enjoyed this? A quick thank you to the author is hugely appreciated.

Okay