Skip to main content

Configuring GitHub Copilot in a JetBrains IDE

You can enable, configure, and disable GitHub Copilot in a JetBrains IDE.

GitHub Copilot can be managed through personal accounts with GitHub Copilot for Individuals or through organization or enterprise accounts with GitHub Copilot for Business.

GitHub Copilot is free to use for verified students, teachers, and maintainers of popular open source projects. For more information, see "About billing for GitHub Copilot."

About GitHub Copilot in JetBrains IDEs

If you use a JetBrains IDE, GitHub Copilot can autocomplete code as you type. After installation, you can enable or disable GitHub Copilot, and you can configure advanced settings within your IDE or on GitHub.com. This article describes how to configure GitHub Copilot in the IntelliJ IDE, but the user interfaces of other JetBrains IDEs may differ.

Configuring GitHub Copilot settings on GitHub.com

Once you have an active GitHub Copilot subscription, you can adjust GitHub Copilot settings for your personal account on GitHub in the GitHub Copilot settings. The settings apply anywhere that you use GitHub Copilot. You can configure the suggestions that GitHub Copilot offers and how GitHub uses your telemetry data.

Enabling or disabling duplication detection

Note: If you are a member of an organization on GitHub Enterprise Cloud who has been assigned a GitHub Copilot seat through your organization, you will not be able to configure duplication detection in your personal account settings. Your duplication detection setting will be inherited from your organization or enterprise.

GitHub Copilot includes a filter which detects code suggestions matching public code on GitHub. You can choose to enable or disable the filter. When the filter is enabled, GitHub Copilot checks code suggestions with their surrounding code of about 150 characters against public code on GitHub. If there is a match or near match, the suggestion will not be shown to you.

  1. In the upper-right corner of any page, click your profile photo, then click Settings.

    Screenshot of GitHub's account menu showing options for users to view and edit their profile, content, and settings. The menu item "Settings" is outlined in dark orange.

  2. In the left sidebar, click GitHub Copilot.

  3. Under Suggestions matching public code, select the dropdown menu, then click Allow to allow suggestions matching public code, or Block to block suggestions matching public code.

  4. To confirm your new settings, click Save.

Further reading

Prerequisites

To configure GitHub Copilot in a JetBrains IDE, you must install the GitHub Copilot plugin. For more information, see "Getting started with GitHub Copilot in a JetBrains IDE."

Keyboard shortcuts for GitHub Copilot

You can use the default keyboard shortcuts for inline suggestions in your JetBrains IDE when using GitHub Copilot. Alternatively, you can rebind the shortcuts to your preferred keyboard shortcuts for each specific command. For more information on rebinding keyboard shortcuts in your JetBrains IDE, see the JetBrains documentation. For example, you can view the IntelliJ IDEA documentation.

ActionShortcut
Accept an inline suggestionTab
Dismiss an inline suggestionEsc
Show next inline suggestionOption (⌥) or Alt+]
Show previous inline suggestionOption (⌥) or Alt+[
Trigger inline suggestionOption (⌥)+\
Open GitHub Copilot (additional suggestions in separate pane)Option (⌥) or Alt+Return
ActionShortcut
Accept an inline suggestionTab
Dismiss an inline suggestionEsc
Show next inline suggestionAlt+]
Show previous inline suggestionAlt+[
Trigger inline suggestionAlt+\
Open GitHub Copilot (additional suggestions in separate pane)Alt+Enter
ActionShortcut
Accept an inline suggestionTab
Dismiss an inline suggestionEsc
Show next inline suggestionAlt+]
Show previous inline suggestionAlt+[
Trigger inline suggestionAlt+\
Open GitHub Copilot (additional suggestions in separate pane)Alt+Enter

Enabling or disabling GitHub Copilot

You can enable or disable GitHub Copilot from within your JetBrains IDE. The GitHub Copilot status icon in the bottom panel of the JetBrains window indicates whether GitHub Copilot is enabled or disabled. When enabled, the icon is highlighted. When disabled, the icon is grayed out.

  1. To enable or disable GitHub Copilot, click the status icon in the bottom panel on the right of the JetBrains window.

    Screenshot of the bottom panel in a JetBrains IDE. The GitHub Copilot status icon is outlined in dark orange.

  2. If you are disabling GitHub Copilot, you will be asked whether you want to disable it globally, or for the language of the file you are currently editing. To disable globally, click Disable Completions. Alternatively, click the language-specific button to disable GitHub Copilot for the specified language.

    Screenshot of the menu to disable GitHub Copilot globally or for the current language in a JetBrains IDE

Configuring advanced settings for GitHub Copilot

You can manage advanced settings for GitHub Copilot in your JetBrains IDE, such as how your IDE displays code completions, and which languages you want to enable or disable for GitHub Copilot.

  1. In your JetBrains IDE, click the File menu, then click Settings.
  2. Under Languages & Frameworks, click GitHub Copilot.
  3. Edit the settings according to your personal preferences.
    • To adjust the behavior and appearance of code suggestions, and whether to automatically check for updates, select or deselect the corresponding checkboxes.
    • If you have selected to receive automatic updates, you can choose whether to receive stable, but less frequent updates, or nightly updates, which may be less stable. Click the Update channel dropdown and select Stable for stable updates, or Nightly for nightly updates.
    • Under "Disabled languages," use the checkboxes to select or deselect the languages you want to disable GitHub Copilot for.

Configuring proxy settings for GitHub Copilot

You can configure GitHub Copilot to connect through an HTTP proxy server in a JetBrains IDE. GitHub Copilot supports basic HTTP proxy setups, with or without basic authentication.

  1. In your JetBrains IDE, click the File menu, then click Settings.
  2. Under Appearance & Behavior, click System Settings and then click HTTP Proxy.
  3. Select Manual proxy configuration, and then select HTTP.
  4. In the "Host name" field, enter the hostname of your proxy server, and in the "Port number" field, enter the port number of your proxy server.
  5. Optionally, in the left sidebar, click Tools and then click Server Certificates. Then select or deselect Accept non-trusted certificates automatically, depending on whether you want to accept non-trusted certificates automatically.

Configuring GitHub Copilot settings on GitHub.com

Once you have an active GitHub Copilot subscription, you can adjust GitHub Copilot settings for your personal account on GitHub in the GitHub Copilot settings. The settings apply anywhere that you use GitHub Copilot. You can configure the suggestions that GitHub Copilot offers and how GitHub uses your telemetry data.

Enabling or disabling duplication detection

Note: If you are a member of an organization on GitHub Enterprise Cloud who has been assigned a GitHub Copilot seat through your organization, you will not be able to configure duplication detection in your personal account settings. Your duplication detection setting will be inherited from your organization or enterprise.

GitHub Copilot includes a filter which detects code suggestions matching public code on GitHub. You can choose to enable or disable the filter. When the filter is enabled, GitHub Copilot checks code suggestions with their surrounding code of about 150 characters against public code on GitHub. If there is a match or near match, the suggestion will not be shown to you.

  1. In the upper-right corner of any page, click your profile photo, then click Settings.

    Screenshot of GitHub's account menu showing options for users to view and edit their profile, content, and settings. The menu item "Settings" is outlined in dark orange.

  2. In the left sidebar, click GitHub Copilot.

  3. Under Suggestions matching public code, select the dropdown menu, then click Allow to allow suggestions matching public code, or Block to block suggestions matching public code.

  4. To confirm your new settings, click Save.

Further reading