Skip to main content

Configuration de GitHub Copilot dans votre environnement

Vous pouvez activer, configurer ou désactiver GitHub Copilot dans un IDE pris en charge.

Dans cet article

About GitHub Copilot in Xcode

If you use Xcode, GitHub Copilot can autocomplete code as you type. After installation, you can enable or disable GitHub Copilot, and you can configure advanced settings within Xcode or on GitHub.

Prerequisites

To configure GitHub Copilot for Xcode, you must install the GitHub Copilot extension. See Installing the GitHub Copilot extension in your environment.

Using or rebinding keyboard shortcuts for GitHub Copilot

You can use the default keyboard shortcuts for inline suggestions in Xcode when using GitHub Copilot. Alternatively, you can rebind the shortcuts to your preferred keyboard shortcuts for each specific command.

Default keyboard shortcuts

ActionShortcut
Accept the first line of a suggestionTab
View full suggestionHold Option
Accept full suggestionOption+Tab

Rebinding keyboard shortcuts

If you don't want to use the default keyboard shortcuts for GitHub Copilot, you can rebind the shortcuts in the Key Bindings editor and use your preferred keyboard shortcuts.

If you want to use something besides Tab to accept the first line of a suggestion, you need to disable the "Accept suggestions with Tab" option in the advanced settings in the GitHub Copilot for Xcode application. Additionally, we currently only support the Option key for the "View full suggestion" action.

  1. In the Xcode menu bar, click Settings.
  2. Click Key Bindings and search for "Copilot" to find the commands you want to rebind.

Enabling or disabling GitHub Copilot

You can enable or disable the GitHub Copilot extension from within the application.

  1. Open the GitHub Copilot extension application.
  2. At the top of the application window, click Advanced.
  3. In the "Suggestion Settings" section, use the "Request suggestions while typing" toggle to enable or disable the extension.

Automatically updating GitHub Copilot for Xcode

You can configure the GitHub Copilot extension to automatically check for updates.

  1. Open the GitHub Copilot extension application.
  2. Select Automatically check for updates.

After updating the extension, Xcode must be restarted for the changes to take effect.

Configuring GitHub Copilot settings on GitHub.com

If you are using a GitHub Copilot Pro subscription, you can choose to allow or block code completion suggestions that match publicly available code. You can also allow or block the collection and retention of the prompts you enter and Copilot's suggestions. You configure this in your personal settings on GitHub.com. See Managing Copilot policies as an individual subscriber.

Authenticating to an account on GHE.com

If you're using a Copilot subscription for a managed user account account on GHE.com, you'll need to update some settings before you sign in. See Using GitHub Copilot with an account on GHE.com.