diff --git a/content/copilot/about-github-copilot.md b/content/copilot/about-github-copilot.md index 80e6149694..d383db8fb4 100644 --- a/content/copilot/about-github-copilot.md +++ b/content/copilot/about-github-copilot.md @@ -38,16 +38,20 @@ For a full list of the features and functionality available on each {% data vari ## Getting access to {% data variables.product.prodname_copilot %} -You can access {% data variables.product.prodname_copilot %} as part of one of the following paid plans. +You can access {% data variables.product.prodname_copilot %} as part of one of the following paid plans: + +- **{% data variables.product.prodname_copilot_individuals_short %}** - Get access to {% data variables.product.prodname_copilot %} in an IDE, or on the command line, for your personal or independent use. You can try {% data variables.product.prodname_copilot %} for free with a one-time 30-day trial. After the free trial, you will need a paid subscription for continued use. For more information, see "[AUTOTITLE](/copilot/copilot-individual/about-github-copilot-individual)." + + If you're a verified student, teacher, or maintainer of a popular open source project, {% data variables.product.prodname_copilot %} is free to use. For more information, see "[AUTOTITLE](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)." -- **{% data variables.product.prodname_copilot_individuals_short %}** - Get access to {% data variables.product.prodname_copilot %} in an IDE, or on the command line, for your personal or independent use. For more information, see "[AUTOTITLE](/copilot/copilot-individual/about-github-copilot-individual)." - **{% data variables.product.prodname_copilot_business_short %}** - Access {% data variables.product.prodname_copilot %} as a member of an organization. Owners of the organization can manage access for individual members or for teams. For more information, see "[AUTOTITLE](/copilot/copilot-business/about-github-copilot-business)." -- **{% data variables.product.prodname_copilot_enterprise_short %}** - In addition to accessing {% data variables.product.prodname_copilot_short %} in an IDE or on the command line, use {% data variables.product.prodname_copilot_short %} on {% data variables.product.prodname_dotcom_the_website %}. This includes the ability to: +- **{% data variables.product.prodname_copilot_enterprise_short %}** - Access {% data variables.product.prodname_copilot %} as a member of an enterprise. Enterprise owners can allow some or all organizations in the enterprise to access {% data variables.product.prodname_copilot %}. If an organization has access to {% data variables.product.prodname_copilot_short %}, owners of the organization can grant access to {% data variables.product.prodname_copilot_enterprise_short %} for some or all members of the organization. For more information, see "[AUTOTITLE](/copilot/github-copilot-enterprise/overview/about-github-copilot-enterprise)." + + With {% data variables.product.prodname_copilot_enterprise_short %}, in addition to accessing {% data variables.product.prodname_copilot_short %} in an IDE or on the command line, you can use {% data variables.product.prodname_copilot_short %} on {% data variables.product.prodname_dotcom_the_website %}. This includes the ability to: - Chat with {% data variables.product.prodname_copilot_short %} to get help with your code, or to ask general tech-related questions. - Create tailored knowledge bases to use as the context for chat. - Generate automatic summaries of pull requests. - For more information, see "[AUTOTITLE](/copilot/github-copilot-enterprise/overview/about-github-copilot-enterprise)." - -{% data reusables.copilot.copilot-one-account-short %} +> [!NOTE] +> {% data reusables.copilot.copilot-one-account-short %} diff --git a/content/copilot/configuring-github-copilot/configuring-github-copilot-in-your-environment.md b/content/copilot/configuring-github-copilot/configuring-github-copilot-in-your-environment.md index 13066fc45d..6b0faabc50 100644 --- a/content/copilot/configuring-github-copilot/configuring-github-copilot-in-your-environment.md +++ b/content/copilot/configuring-github-copilot/configuring-github-copilot-in-your-environment.md @@ -1,6 +1,6 @@ --- title: Configuring GitHub Copilot in your environment -shortTitle: In your environment +shortTitle: Copilot in your environment intro: 'You can enable, configure, or disable {% data variables.product.prodname_copilot %} in a supported IDE.' product: '{% data reusables.gated-features.copilot %}' redirect_from: diff --git a/content/copilot/configuring-github-copilot/configuring-github-copilot-settings-on-githubcom.md b/content/copilot/configuring-github-copilot/configuring-github-copilot-settings-on-githubcom.md index f932d9bb5d..42e16e9608 100644 --- a/content/copilot/configuring-github-copilot/configuring-github-copilot-settings-on-githubcom.md +++ b/content/copilot/configuring-github-copilot/configuring-github-copilot-settings-on-githubcom.md @@ -1,5 +1,6 @@ --- title: Configuring GitHub Copilot settings on GitHub.com +shortTitle: Copilot on GitHub.com intro: 'You can change your personal settings on {% data variables.product.prodname_dotcom_the_website %} to configure {% data variables.product.prodname_copilot %}''s behavior. This affects how {% data variables.product.prodname_copilot %} functions in any supported IDE you use.' product: '{% data reusables.gated-features.copilot %}' permissions: 'People with individual {% data variables.product.prodname_copilot %} subscriptions can configure their settings on {% data variables.product.prodname_dotcom_the_website %}.' @@ -10,7 +11,6 @@ versions: redirect_from: - /github/copilot/about-github-copilot-telemetry - /github/copilot/github-copilot-telemetry-terms -shortTitle: GitHub.com --- ## About {% data variables.product.prodname_copilot %} settings on {% data variables.product.prodname_dotcom_the_website %} diff --git a/content/copilot/configuring-github-copilot/index.md b/content/copilot/configuring-github-copilot/index.md index 0601784378..a08f86f528 100644 --- a/content/copilot/configuring-github-copilot/index.md +++ b/content/copilot/configuring-github-copilot/index.md @@ -9,5 +9,6 @@ topics: children: - /configuring-github-copilot-settings-on-githubcom - /configuring-github-copilot-in-your-environment + - /installing-the-github-copilot-extension-in-your-environment - /configuring-network-settings-for-github-copilot --- diff --git a/content/copilot/configuring-github-copilot/installing-the-github-copilot-extension-in-your-environment.md b/content/copilot/configuring-github-copilot/installing-the-github-copilot-extension-in-your-environment.md new file mode 100644 index 0000000000..443060042d --- /dev/null +++ b/content/copilot/configuring-github-copilot/installing-the-github-copilot-extension-in-your-environment.md @@ -0,0 +1,168 @@ +--- +title: Installing the GitHub Copilot extension in your environment +shortTitle: Install Copilot extension +intro: 'To use {% data variables.product.prodname_copilot_short %} in your preferred coding environment, you must install the {% data variables.product.prodname_copilot %} extension.' +versions: + feature: copilot +defaultTool: vscode +topics: + - Copilot +--- + +{% azure_data_studio %} + +Installing the {% data variables.product.prodname_copilot %} extension in Azure Data Studio allows you to receive coding suggestions from {% data variables.product.prodname_copilot_short %} as you type. + +To see instructions for other popular coding environments, use the tool switcher at the top of the page. + +## Installing the {% data variables.product.prodname_copilot %} extension in Azure Data Studio + +1. Make sure you have access to {% data variables.product.prodname_copilot %}. For information, see "[AUTOTITLE](/copilot/about-github-copilot#getting-access-to-github-copilot)." + +1. Make sure you have a compatible version of Azure Data Studio. To use {% data variables.product.prodname_copilot %} in Azure Data Studio, you must have Azure Data Studio version 1.44.0 or later installed. See the [Azure Data Studio download page](https://docs.microsoft.com/sql/azure-data-studio/download-azure-data-studio) in the Azure Data Studio documentation. + +1. Install the {% data variables.product.prodname_copilot %} extension in Azure Data Studio. See [Install the {% data variables.product.prodname_copilot %} extension](https://learn.microsoft.com/en-us/azure-data-studio/extensions/github-copilot-extension-overview#install-the-github-copilot-extension) in the Microsoft documentation. + +1. If a popup window in Azure Data Studio prompts you to sign in to use {% data variables.product.prodname_copilot %}, click **Sign in to {% data variables.product.prodname_dotcom %}** and follow the instructions on screen. + + - If you have previously authorized Azure Data Studio for your account on {% data variables.product.prodname_dotcom %}, {% data variables.product.prodname_copilot %} will be automatically authorized. + - If you don't get the prompt to authorize, you can view notifications by clicking the bell icon in the bottom panel of the Azure Data Studio window. + +1. If you are following the authorization steps, in your browser, {% data variables.product.prodname_dotcom %} will request the necessary permissions for {% data variables.product.prodname_copilot %}. To approve these permissions, click **Authorize Azure Data Studio**. + +{% endazure_data_studio %} + +{% jetbrains %} + +Installing the {% data variables.product.prodname_copilot %} extension in JetBrains IDEs allows you to receive coding suggestions from {% data variables.product.prodname_copilot_short %} as you type. + +To see instructions for other popular coding environments, use the tool switcher at the top of the page. + +## Installing the {% data variables.product.prodname_copilot %} plugin in your JetBrains IDE + +The following procedure will guide you through installation of the {% data variables.product.prodname_copilot %} plugin in IntelliJ IDEA. Steps to install the plugin in another supported IDE may differ. + +1. Make sure you have access to {% data variables.product.prodname_copilot %}. For information, see "[AUTOTITLE](/copilot/about-github-copilot#getting-access-to-github-copilot)." + +1. Make sure you have a JetBrains IDE that is compatible with {% data variables.product.prodname_copilot %}. {% data variables.product.prodname_copilot %} is compatible with the following IDEs: + + - IntelliJ IDEA (Ultimate, Community, Educational) + - Android Studio + - AppCode + - CLion + - Code With Me Guest + - DataGrip + - DataSpell + - GoLand + - JetBrains Client + - MPS + - PhpStorm + - PyCharm (Professional, Community, Educational) + - Rider + - RubyMine + - RustRover + - WebStorm + + For more information, see the [JetBrains IDEs](https://www.jetbrains.com/products/) tool finder. + +1. Install the {% data variables.product.prodname_copilot %} plugin for JetBrains. See [{% data variables.product.prodname_copilot %} plugin](https://plugins.jetbrains.com/plugin/17718-github-copilot) in the JetBrains Marketplace. + +1. After {% data variables.product.prodname_copilot %} is installed, click **Restart IDE**. + +1. After your JetBrains IDE has restarted, click the **Tools** menu. Click **{% data variables.product.prodname_copilot %}**, then click **Login to {% data variables.product.prodname_dotcom %}**. + + ![Screenshot of the expanded "Tools" menu and "{% data variables.product.prodname_copilot %}" sub-menu. The "Login to {% data variables.product.prodname_dotcom %}" option is highlighted in blue.](/assets/images/help/copilot/jetbrains-tools-menu.png) + +1. In the "Sign in to {% data variables.product.prodname_dotcom %}" dialog box, to copy the device code and open the device activation window, click **Copy and Open**. + + ![Screenshot of the "Sign in to {% data variables.product.prodname_dotcom %}" dialog. A device code is displayed above a button labeled "Copy and Open".](/assets/images/help/copilot/device-code-copy-and-open.png) + +1. A device activation window will open in your browser. Paste the device code, then click **Continue**. + +1. {% data variables.product.prodname_dotcom %} will request the necessary permissions for {% data variables.product.prodname_copilot %}. To approve these permissions, click **Authorize {% data variables.product.prodname_copilot %} Plugin**. + +1. After the permissions have been approved, your JetBrains IDE will show a confirmation. To begin using {% data variables.product.prodname_copilot %}, click **OK**. + +{% endjetbrains %} + +{% vimneovim %} + +Installing the {% data variables.product.prodname_copilot %} extension in Vim/Neovim allows you to receive coding suggestions from {% data variables.product.prodname_copilot_short %} as you type. + +To see instructions for other popular coding environments, use the tool switcher at the top of the page. + +## Installing the {% data variables.product.prodname_copilot %} extension in Vim/Neovim + +{% data variables.product.prodname_dotcom %} recommends that you install the {% data variables.product.prodname_copilot %} plugin with Vim/Neovim's built-in plugin manager. Alternatively, you can use a plugin manager of your choice to install `github/copilot.vim`. For more information, see the [copilot.vim repository](https://github.com/github/copilot.vim). + +1. Make sure you have access to {% data variables.product.prodname_copilot %}. For information, see "[AUTOTITLE](/copilot/about-github-copilot#getting-access-to-github-copilot)." + +1. Make sure you have a compatible version of Vim/Neovim installed. To use {% data variables.product.prodname_copilot %} in Vim/Neovim you must have Vim version 9.0.0185 / Neovim version 0.6 or above and Node.js version 18 or above. See the [Vim](https://vimhelp.org/) / [Neovim documentation](https://neovim.io/doc/) and the [Node.js website](https://nodejs.org/en/). + +1. Install {% data variables.product.prodname_copilot %} using the built-in plugin manager: + + - For **Vim on macOS or Linux**, run the following command in the terminal. + + ```shell copy + git clone https://github.com/github/copilot.vim \ + ~/.vim/pack/github/start/copilot.vim + ``` + + - For **Vim on Windows**, run the following command in Git Bash: + + ```shell copy + git clone https://github.com/github/copilot.vim.git \ + $HOME/vimfiles/pack/github/start/copilot.vim + ``` + + - For **Neovim on macOS or Linux**, run the following command in the terminal. + + ```shell copy + git clone https://github.com/github/copilot.vim \ + ~/.config/nvim/pack/github/start/copilot.vim + ``` + + - For **Neovim on Windows**, run the following command in Git Bash: + + ```shell copy + git clone https://github.com/github/copilot.vim.git \ + $HOME/AppData/Local/nvim/pack/github/start/copilot.vim + ``` + +{% data reusables.copilot.config-enable-copilot-in-vimneovim %} + +{% endvimneovim %} + +{% visualstudio %} + +Installing the {% data variables.product.prodname_copilot %} extension in {% data variables.product.prodname_vs %} allows you to receive coding suggestions from {% data variables.product.prodname_copilot_short %} as you type. + +To see instructions for other popular coding environments, use the tool switcher at the top of the page. + +## Installing the {% data variables.product.prodname_copilot %} extension in {% data variables.product.prodname_vs %} + +1. Make sure you have access to {% data variables.product.prodname_copilot %}. For information, see "[AUTOTITLE](/copilot/about-github-copilot#getting-access-to-github-copilot)." + +1. Make sure you have a compatible version of {% data variables.product.prodname_vs %} installed. To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %}, you must have version 2022 17.6 or later of {% data variables.product.prodname_vs %} for Windows. Note that {% data variables.product.prodname_copilot_short %} is not currently available in {% data variables.product.prodname_vs %} for Mac. For more information, see "[Install {% data variables.product.prodname_vs %}](https://learn.microsoft.com/en-us/visualstudio/install/install-visual-studio)" in the Microsoft documentation. + +1. Install the {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %} See "[Install GitHub Copilot in Visual Studio](https://learn.microsoft.com/en-us/visualstudio/ide/visual-studio-github-copilot-install-and-states)" in the Microsoft documentation. + +1. After installing the {% data variables.product.prodname_copilot %} extension, to enable {% data variables.product.prodname_copilot %}, ensure you have added your {% data variables.product.prodname_dotcom %} account to {% data variables.product.prodname_vs %}. For more information, see [Add your {% data variables.product.prodname_dotcom %} accounts to your {% data variables.product.prodname_vs %} keychain](https://learn.microsoft.com/en-us/visualstudio/ide/work-with-github-accounts) in the Microsoft documentation. + +{% endvisualstudio %} + +{% vscode %} + +Installing the {% data variables.product.prodname_copilot %} extension in {% data variables.product.prodname_vscode %} allows you to receive coding suggestions from {% data variables.product.prodname_copilot_short %} as you type. It also automatically installs the {% data variables.product.prodname_copilot_chat %} extension, which allows you to chat with {% data variables.product.prodname_copilot_short %}. + +To see instructions for other popular coding environments, use the tool switcher at the top of the page. + +## Installing the {% data variables.product.prodname_copilot %} extension in {% data variables.product.prodname_vscode %} + +1. Make sure you have access to {% data variables.product.prodname_copilot %}. For information, see "[AUTOTITLE](/copilot/about-github-copilot#getting-access-to-github-copilot)." + +1. Install {% data variables.product.prodname_vscode %}. See the [{% data variables.product.prodname_vscode %} download page](https://code.visualstudio.com/Download). + +1. Install the [{% data variables.product.prodname_copilot %} extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) in {% data variables.product.prodname_vscode %}. For detailed instructions, see "[Set up {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}](https://code.visualstudio.com/docs/copilot/setup)" in the {% data variables.product.prodname_vscode %} documentation. + +{% endvscode %} diff --git a/content/copilot/index.md b/content/copilot/index.md index 809a2122f2..f2897fed59 100644 --- a/content/copilot/index.md +++ b/content/copilot/index.md @@ -11,7 +11,7 @@ introLinks: quickstart: /copilot/quickstart featuredLinks: startHere: - - /copilot/using-github-copilot/getting-started-with-github-copilot + - /copilot/using-github-copilot/using-github-copilot-code-suggestions-in-your-editor popular: - /billing/managing-billing-for-github-copilot/about-billing-for-github-copilot - /copilot/configuring-github-copilot/configuring-github-copilot-in-your-environment diff --git a/content/copilot/quickstart.md b/content/copilot/quickstart.md index 549f35f91f..dec7fe6c16 100644 --- a/content/copilot/quickstart.md +++ b/content/copilot/quickstart.md @@ -52,7 +52,7 @@ To use {% data variables.product.prodname_copilot %} in {% data variables.produc {% data reusables.copilot.create-js-file %} {% data reusables.copilot.type-function-header %} {% data variables.product.prodname_copilot %} will automatically suggest an entire function body in grayed text. The exact suggestion may vary. -{% data reusables.copilot.accept-suggestion %} +1. {% data reusables.copilot.accept-suggestion %} {% ifversion fpt %} @@ -150,7 +150,7 @@ As an enterprise owner, you must decide whether to allow all organizations in yo ## Next steps -{% data reusables.copilot.next-steps %} +You successfully installed {% data variables.product.prodname_copilot %} and received your first suggestion, but that's just the beginning! Here are some helpful resources for taking your next steps with {% data variables.product.prodname_copilot %}. - "[AUTOTITLE](/copilot/managing-github-copilot-in-your-organization/granting-access-to-copilot-for-members-of-your-organization)": As an organization owner, learn how to grant access to {% ifversion ghec %}{% data variables.product.prodname_copilot_enterprise_short %} or{% endif %} {% data variables.product.prodname_copilot_business_short %} in your organization. - "[AUTOTITLE](/copilot/using-github-copilot/getting-started-with-github-copilot)": You've learned how to get your first suggestion in {% data variables.product.prodname_vscode %}. These guides show you how to set up and navigate the various functions of {% data variables.product.prodname_copilot %} across all of the supported environments. diff --git a/content/copilot/using-github-copilot/finding-public-code-that-matches-github-copilot-suggestions.md b/content/copilot/using-github-copilot/finding-public-code-that-matches-github-copilot-suggestions.md index 21951c6772..96b848f495 100644 --- a/content/copilot/using-github-copilot/finding-public-code-that-matches-github-copilot-suggestions.md +++ b/content/copilot/using-github-copilot/finding-public-code-that-matches-github-copilot-suggestions.md @@ -1,6 +1,6 @@ --- title: Finding public code that matches GitHub Copilot suggestions -shortTitle: Finding matching code +shortTitle: Find matching code intro: 'If you allow {% data variables.product.prodname_copilot %} to make suggestions that match publicly available code, you can see references to the matching code on {% data variables.product.prodname_dotcom_the_website %}.' redirect_from: - /early-access/copilot/code-referencing-in-github-copilot diff --git a/content/copilot/using-github-copilot/getting-started-with-github-copilot.md b/content/copilot/using-github-copilot/getting-started-with-github-copilot.md deleted file mode 100644 index 64b02adcf3..0000000000 --- a/content/copilot/using-github-copilot/getting-started-with-github-copilot.md +++ /dev/null @@ -1,631 +0,0 @@ ---- -title: Getting started with GitHub Copilot -shortTitle: Getting started -intro: "You can start using {% data variables.product.prodname_copilot %} by installing the extension in your preferred environment." -product: "{% data reusables.gated-features.copilot %}" -redirect_from: - - /copilot/getting-started-with-github-copilot - - /github/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code - - /github/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide - - /github/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-neovim - - /github/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio - - /copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code - - /copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide - - /copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-neovim - - /copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio -versions: - feature: copilot -defaultTool: vscode -topics: - - Copilot ---- - -Start a free trial {% octicon "link-external" height:16 %} - -{% jetbrains %} - -## About {% data variables.product.prodname_copilot %} and JetBrains IDEs - -{% data reusables.copilot.procedural-intro %} - -If you use a JetBrains IDE, you can view and incorporate suggestions from {% data variables.product.prodname_copilot %} directly within the editor. This guide demonstrates how to use {% data variables.product.prodname_copilot %} within a JetBrains IDE for macOS, Windows, or Linux. - -## Prerequisites - -{% data reusables.copilot.subscription-prerequisite %} - -- To use {% data variables.product.prodname_copilot %} in JetBrains, you must have a compatible JetBrains IDE installed. {% data variables.product.prodname_copilot %} is compatible with the following IDEs: - - - IntelliJ IDEA (Ultimate, Community, Educational) - - Android Studio - - AppCode - - CLion - - Code With Me Guest - - DataGrip - - DataSpell - - GoLand - - JetBrains Client - - MPS - - PhpStorm - - PyCharm (Professional, Community, Educational) - - Rider - - RubyMine - - RustRover - - WebStorm - - For more information, see the [JetBrains IDEs](https://www.jetbrains.com/products/) tool finder. - -## Installing the {% data variables.product.prodname_copilot %} plugin in your JetBrains IDE - -To use {% data variables.product.prodname_copilot %} in a JetBrains IDE, you must install the {% data variables.product.prodname_copilot %} extension. The following procedure will guide you through installation of the {% data variables.product.prodname_copilot %} plugin in IntelliJ IDEA. Steps to install the plugin in another supported IDE may differ. - -1. In your JetBrains IDE, under the **File** menu for Windows, or under the name of your IDE for Mac (for example, **PyCharm** or **IntelliJ**), click **Settings**. -1. In the left-side menu of the **Settings** dialog box, click **Plugins**. -1. At the top of the **Settings** dialog box, click **Marketplace**. In the search bar, search for `copilot`, then click **Install**. - - ![Screenshot of the "Marketplace" tab in the "Settings" dialog. The "GitHub Copilot" plugin is shown with a selected checkbox.](/assets/images/help/copilot/jetbrains-marketplace.png) - -1. After {% data variables.product.prodname_copilot %} is installed, click **Restart IDE**. -1. After your JetBrains IDE has restarted, click the **Tools** menu. Click **{% data variables.product.prodname_copilot %}**, then click **Login to {% data variables.product.prodname_dotcom %}**. - - ![Screenshot of the expanded "Tools" menu and "{% data variables.product.prodname_copilot %}" sub-menu. The "Login to {% data variables.product.prodname_dotcom %}" option is highlighted in blue.](/assets/images/help/copilot/jetbrains-tools-menu.png) - -1. In the "Sign in to {% data variables.product.prodname_dotcom %}" dialog box, to copy the device code and open the device activation window, click **Copy and Open**. - - ![Screenshot of the "Sign in to {% data variables.product.prodname_dotcom %}" dialog. A device code is displayed above a button labeled "Copy and Open".](/assets/images/help/copilot/device-code-copy-and-open.png) - -1. A device activation window will open in your browser. Paste the device code, then click **Continue**. -1. {% data variables.product.prodname_dotcom %} will request the necessary permissions for {% data variables.product.prodname_copilot %}. To approve these permissions, click **Authorize {% data variables.product.prodname_copilot %} Plugin**. -1. After the permissions have been approved, your JetBrains IDE will show a confirmation. To begin using {% data variables.product.prodname_copilot %}, click **OK**. - -## Seeing your first suggestion - -{% data reusables.copilot.code-examples-limitations %} - -{% data reusables.copilot.supported-languages %} The following samples are in Java, but other languages will work similarly. - -{% data reusables.copilot.create-java-file %} - -1. In the Java file, create a class by typing `class Test`. {% data variables.product.prodname_copilot %} will automatically suggest a class body in grayed text. The exact suggestion may vary. -{% data reusables.copilot.accept-suggestion %} -1. To prompt {% data variables.product.prodname_copilot %} to suggest a function body, type the following line below the bracket of the `main` function. The exact suggestion may vary. -{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %} -{% data reusables.copilot.accept-suggestion %} - -{% data variables.product.prodname_copilot %} will attempt to match the context and style of your code. You can always edit the suggested code. - -## Seeing alternative suggestions - -{% data reusables.copilot.alternative-suggestions %} - -{% data reusables.copilot.create-java-file %} - -1. To prompt {% data variables.product.prodname_copilot %} to show you a suggestion, type the following line in the Java file. - {% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %} - {% data reusables.copilot.see-alternative-suggestions %} - - | OS | See next suggestion | See previous suggestion | - | :------ | :----------------------------- | :----------------------------- | - | macOS | Option+] | Option+[ | - | Windows | Alt+] | Alt+[ | - | Linux | Alt+] | Alt+[ | - -{% data reusables.copilot.accept-or-reject-suggestion %} - -## Partially accepting suggestions - -You may not want to accept an entire suggestion from {% data variables.product.prodname_copilot %}. You can use keyboard shortcuts to accept either the next word of a suggestion, or the next line. -{% data reusables.copilot.create-java-file %} - -1. To prompt {% data variables.product.prodname_copilot %} to show you a suggestion, type the following line in the Java file. - {% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %} - -1. To accept a part of the suggestion, use one of the following keyboard shortcuts. - | OS | Accept Next Word | Accept Next Line | - | :- | :- | :- | - |macOS|Command+|Command+Control+| - |Windows|Control+|Control+Alt+| - |Linux|Control+|Control+Alt+| - -1. Alternatively, you can hover over the suggestion to see the {% data variables.product.prodname_copilot %} command palette for choosing suggestions. - -## Seeing multiple suggestions in a new tab - -{% data reusables.copilot.suggestions-new-tab %} - -{% data reusables.copilot.create-java-file %} - -1. To prompt {% data variables.product.prodname_copilot %} to show you a suggestion, type the following line in the Java file. - {% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %} -1. Open a new tab with multiple additional suggestions. - - - On macOS, press Command+Shift+A, then click **Open GitHub Copilot**, or press Command+Shift+\\ to open the new tab immediately. - - On Windows or Linux, press Ctrl+Enter, then click **Open GitHub Copilot**. - -1. To accept a suggestion, below the suggestion, click **Accept suggestion NUMBER**. To reject all suggestions, close the tab. - -## Generating code suggestions from comments - -{% data reusables.copilot.generating-suggestions-from-comments %} - -{% data reusables.copilot.create-java-file %} - -1. To prompt {% data variables.product.prodname_copilot %} to suggest an implementation of a function in the Java file, type the following lines. - - ```java copy - // find all images without alternate text - // and give them a red border - void process () { - ``` - -## Enabling and disabling {% data variables.product.prodname_copilot %} - -You can enable or disable {% data variables.product.prodname_copilot %} for all languages, or for individual languages. The {% data variables.product.prodname_copilot %} status icon in the bottom panel of your JetBrains IDE window indicates whether {% data variables.product.prodname_copilot %} is enabled or disabled. When enabled, the icon is highlighted. When disabled, the icon is grayed out. - -1. To enable or disable {% data variables.product.prodname_copilot %}, click the status icon in the bottom panel of the JetBrains window. - - ![Screenshot of the IntelliJ IDEA toolbar. The {% data variables.product.prodname_copilot %} logo is highlighted with an orange outline.](/assets/images/help/copilot/status-icon-jetbrains.png) - -1. If you are disabling {% data variables.product.prodname_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 suggestions from {% data variables.product.prodname_copilot %} globally, click **Disable Completions**. - - To disable suggestions from {% data variables.product.prodname_copilot %} for the specified language, click **Disable Completions for _LANGUAGE_**. - - ![Screenshot of option to disable {% data variables.product.prodname_copilot %} globally or for the current language.](/assets/images/help/copilot/disable-copilot-global-or-language-jetbrains.png) - -{% endjetbrains %} - -{% visualstudio %} - -## About {% data variables.product.prodname_copilot %} and {% data variables.product.prodname_vs %} - -{% data reusables.copilot.procedural-intro %} - -If you use {% data variables.product.prodname_vs %}, you can view and incorporate suggestions from {% data variables.product.prodname_copilot %} directly within the editor. This guide demonstrates how to use {% data variables.product.prodname_copilot %} within {% data variables.product.prodname_vs %} for Windows. - -## Prerequisites - -{% data reusables.copilot.subscription-prerequisite %} - -- To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %}, you must have {% data variables.product.prodname_vs %} 2022 17.8 or later installed. For more information about using {% data variables.product.prodname_copilot_chat %} in {% data variables.product.prodname_vs %}, see the [{% data variables.product.prodname_vs %} {% data variables.product.prodname_copilot_chat_short %}](https://learn.microsoft.com/en-gb/visualstudio/ide/visual-studio-github-copilot-chat?view=vs-2022) documentation. - -{% data reusables.copilot.vs-for-mac-note %} - -## Installing the {% data variables.product.prodname_copilot %} extension in {% data variables.product.prodname_vs %} - -{% data reusables.copilot.install-copilot-vs-intro %} - -{% data reusables.copilot.install-copilot-and-chat-combo-vs-procedure %} - -### Installing the {% data variables.product.prodname_copilot %} extension in {% data variables.product.prodname_vs %} for versions 17.8 and 17.9 - -To use {% data variables.product.prodname_copilot %}, you must first install the {% data variables.product.prodname_copilot %} extension. - -{% data reusables.copilot.link-to-vs-docs %} - -{% data reusables.copilot.vs-extensions %} - -1. In the "Manage Extensions" window, click **{% data variables.product.prodname_vs %} Marketplace**, search for the {% data variables.product.prodname_copilot %} extension, then click **Download**. - - ![Screenshot of a list of search results. Next to the {% data variables.product.prodname_copilot %} extension, the "Download" button is highlighted with an orange outline.](/assets/images/help/copilot/install-copilot-extension-visual-studio.png) - -{% data reusables.copilot.vs-exit-and-relaunch %} - -1. Optionally, to check that {% data variables.product.prodname_copilot %} is installed and enabled, go back to **Manage Extensions**, click **Installed** to view your currently installed extensions, then click **{% data variables.product.prodname_copilot %}** to see status information. - - ![Screenshot of a list of installed extensions in {% data variables.product.prodname_vs %}. The "{% data variables.product.prodname_copilot %}" extension is highlighted with an orange outline.](/assets/images/help/copilot/installed-copilot-extension-visual-studio.png) - -1. Open or create a new project in {% data variables.product.prodname_vs %}. -1. To enable {% data variables.product.prodname_copilot %}, ensure you have added your {% data variables.product.prodname_dotcom %} account to {% data variables.product.prodname_vs %}. For more information, see [Work with {% data variables.product.prodname_dotcom %} accounts in {% data variables.product.prodname_vs %}](https://learn.microsoft.com/en-us/visualstudio/ide/work-with-github-accounts) in the Microsoft documentation. - -## Seeing your first suggestion - -{% data reusables.copilot.code-examples-limitations %} -{% data reusables.copilot.supported-languages %} The following samples are in C#, but other languages will work similarly. - -{% data reusables.copilot.create-c-file %} - -1. In the C# file, type the following function signature. {% data variables.product.prodname_copilot %} will automatically suggest an entire function body in grayed text, as shown below. The exact suggestion may vary. - - ```csharp copy - int CalculateDaysBetweenDates( - ``` - -{% data reusables.copilot.accept-suggestion %} - -## Seeing alternative suggestions - -{% data reusables.copilot.alternative-suggestions %} -{% data reusables.copilot.create-c-file %} - -1. In the C# file, type the following function signature. {% data variables.product.prodname_copilot %} will show you a suggestion. - - ```csharp copy - int CalculateDaysBetweenDates( - ``` - -1. If alternative suggestions are available, you can see these alternatives by pressing Alt+. (or Alt+,). -1. Optionally, you can hover over the suggestion to see the {% data variables.product.prodname_copilot %} command palette for choosing suggestions. - {% data reusables.copilot.accept-or-reject-suggestion %} - -## Generating code suggestions from comments - -{% data reusables.copilot.generating-suggestions-from-comments %} - -{% data reusables.copilot.create-c-file %} - -1. In the C# file, type the following comment. {% data variables.product.prodname_copilot %} will suggest an implementation of the function. - - ```csharp copy - using System.Xml.Linq; - - var doc = XDocument.Load("index.xhml"); - - // find all images - ``` - -{% data reusables.copilot.accept-suggestion %} - -{% data reusables.copilot.enabling-or-disabling-vs %} - -{% endvisualstudio %} - -{% vscode %} - -## About {% data variables.product.prodname_copilot %} and {% data variables.product.prodname_vscode %} - -{% data reusables.copilot.procedural-intro %} - -If you use {% data variables.product.prodname_vscode %}, you can view and incorporate suggestions from {% data variables.product.prodname_copilot %} directly within the editor. This guide demonstrates how to use {% data variables.product.prodname_copilot %} within {% data variables.product.prodname_vscode %} for macOS, Windows, or Linux. - -## Prerequisites - -{% data reusables.copilot.subscription-prerequisite %} - -- To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, you must have {% data variables.product.prodname_vscode %} installed. For more information, see the [{% data variables.product.prodname_vscode %} download page](https://code.visualstudio.com/Download). - -## Installing the {% data variables.product.prodname_copilot %} extension in {% data variables.product.prodname_vscode %} - -To use {% data variables.product.prodname_copilot %}, you must first install the {% data variables.product.prodname_copilot %} extension. - -1. In the {% data variables.product.prodname_vscode_marketplace %}, go to the [{% data variables.product.prodname_copilot %} extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) page and click **Install**. -1. A popup will appear, asking to open {% data variables.product.prodname_vscode %}. Click **Open {% data variables.product.prodname_vscode %}**. -1. In the "Extension: {% data variables.product.prodname_copilot %}" tab in {% data variables.product.prodname_vscode %}, click **Install**. -1. If you have not previously authorized {% data variables.product.prodname_vscode %} in your {% data variables.product.prodname_dotcom %} account, you will be prompted to sign in to {% data variables.product.prodname_dotcom %} in {% data variables.product.prodname_vscode %}. - - - If you have previously authorized {% data variables.product.prodname_vscode %} for your account on {% data variables.product.prodname_dotcom %}, {% data variables.product.prodname_copilot %} will be automatically authorized. - - If you don't get the prompt to authorize, click the bell icon in the bottom panel of the {% data variables.product.prodname_vscode %} window. - - ![Screenshot of the {% data variables.product.prodname_vscode %} task bar with {% data variables.product.prodname_copilot %} icons. The bell icon is outlined in dark orange.](/assets/images/help/copilot/copilot-activate.png) - -1. In your browser, {% data variables.product.prodname_dotcom %} will request the necessary permissions for {% data variables.product.prodname_copilot %}. To approve these permissions, click **Authorize {% data variables.product.prodname_vscode %}**. -1. To confirm the authentication, in {% data variables.product.prodname_vscode %}, in the "{% data variables.product.prodname_vscode %}" dialog box, click **Open**. - -## Seeing your first suggestion - -{% data reusables.copilot.code-examples-limitations %} - -{% data reusables.copilot.supported-languages %} The following samples are in JavaScript, but other languages will work similarly. - -{% data reusables.copilot.create-js-file %} - -1. In the JavaScript file, type the following function header. {% data variables.product.prodname_copilot %} will automatically suggest an entire function body in grayed text, as shown below. The exact suggestion may vary. - - ```javascript copy - function calculateDaysBetweenDates(begin, end) { - ``` - -{% data reusables.copilot.accept-suggestion %} - -{% note %} - -**Note**: If you don't see a suggestion, make sure {% data variables.product.prodname_copilot %} is enabled. You should see the {% data variables.product.prodname_copilot_short %} icon at the bottom right of the {% data variables.product.prodname_vscode %} window. - -{% data reusables.copilot.content-exclusion-tooltip %} - -{% endnote %} - -## Seeing alternative suggestions - -{% data reusables.copilot.alternative-suggestions %} - -{% data reusables.copilot.create-js-file %} - -1. In the JavaScript file, type the following function header. {% data variables.product.prodname_copilot %} will show you a suggestion. - - ```javascript copy - function calculateDaysBetweenDates(begin, end) { - ``` - -{% data reusables.copilot.see-alternative-suggestions %} - - | OS | See next suggestion | See previous suggestion | - | :------ | :---------------------------------------- | :---------------------------------------- | - | macOS | Option (⌥) or Alt+] | Option (⌥) or Alt+[ | - | Windows | Alt+] | Alt+[ | - | Linux | Alt+] | Alt+[ | - -1. Alternatively, you can hover over the suggestion to see the {% data variables.product.prodname_copilot %} command palette for choosing suggestions. -{% data reusables.copilot.accept-or-reject-suggestion %} - -## Partially accepting suggestions - -You may not want to accept an entire suggestion from {% data variables.product.prodname_copilot %}. You can use keyboard shortcuts to accept either the next word of a suggestion, or the next line. -{% data reusables.copilot.create-js-file %} - -1. In the JavaScript file, type the following function header. {% data variables.product.prodname_copilot %} will automatically suggest an entire function body in grayed text, as shown below. The exact suggestion may vary. - - ```javascript copy - function calculateDaysBetweenDates(begin, end) { - ``` - -1. If you want to accept only the next word of the suggestion, use one of the following keyboard shortcuts. - | OS | Accept Next Word | - | :- | :- | - |macOS|Command+| - |Windows|Control+| - |Linux|Control+| - -1. If you want to accept the next line of the suggestion, you will need to set a custom keyboard shortcut for the command `editor.action.inlineSuggest.acceptNextLine`. For more information on setting custom keyboard shortcuts, see "[AUTOTITLE](/copilot/configuring-github-copilot/configuring-github-copilot-in-your-environment#using-or-rebinding-keyboard-shortcuts-for-github-copilot)." -1. Alternatively, you can hover over the suggestion to see the {% data variables.product.prodname_copilot %} command palette for choosing suggestions. - -## Seeing multiple suggestions in a new tab - -{% data reusables.copilot.suggestions-new-tab %} - -{% data reusables.copilot.create-js-file %} - -1. In the JavaScript file, type the following function header. {% data variables.product.prodname_copilot %} will show you a suggestion. - - ```javascript copy - function calculateDaysBetweenDates(begin, end) { - ``` - -1. To open a new tab with multiple additional options, press Ctrl+Enter. -1. To accept a suggestion, below the suggestion, click **Accept suggestion NUMBER**. To reject all suggestions, close the tab. - -## Generating code suggestions from comments - -{% data reusables.copilot.generating-suggestions-from-comments %} - -{% data reusables.copilot.create-js-file %} - -1. In the JavaScript file, type the following comment. {% data variables.product.prodname_copilot %} will suggest an implementation of the function. - - ```javascript copy - // find all images without alternate text - // and give them a red border - function process() { - ``` - -## Using a framework - -You can also use {% data variables.product.prodname_copilot %} to generate suggestions for APIs and frameworks. The following example uses {% data variables.product.prodname_copilot %} to create a simple Express server that returns the current time. - -{% data reusables.copilot.create-js-file %} - -1. In the JavaScript file, type the following comment and then press Enter. {% data variables.product.prodname_copilot %} will suggest an implementation of the Express app. - - ```javascript copy - // Express server on port 3000 - ``` - -1. To accept each line, press Tab, then Enter. -1. Type the following comment and then press Enter. {% data variables.product.prodname_copilot %} will suggest an implementation for the default handler. - - ```javascript copy - // Return the current time - ``` - -1. To accept each line, press Tab. - -{% data reusables.copilot.enabling-or-disabling-in-vsc %} - -{% endvscode %} - -{% vimneovim %} - -## About {% data variables.product.prodname_copilot %} and Vim/Neovim - -{% data reusables.copilot.procedural-intro %} - -If you use Vim/Neovim, you can view and incorporate suggestions from {% data variables.product.prodname_copilot %} directly within the editor. - -## Prerequisites - -{% data reusables.copilot.subscription-prerequisite %} - -- To use {% data variables.product.prodname_copilot %} in Vim/Neovim you must have Vim version 9.0.0185 / Neovim version 0.6 or above and Node.js version 18 or above installed. For more information, see the [Vim](https://vimhelp.org/) / [Neovim documentation](https://neovim.io/doc/) and the [Node.js website](https://nodejs.org/en/). - -## Installing the {% data variables.product.prodname_copilot %} extension in Vim/Neovim on macOS - -{% data reusables.copilot.install-copilot-in-vimneovim %} - -- To install {% data variables.product.prodname_copilot %} with Vim's built-in plugin manager, enter the following command in Terminal: - - git clone https://github.com/github/copilot.vim \ - ~/.vim/pack/github/start/copilot.vim - -- To install {% data variables.product.prodname_copilot %} with Neovim's built-in plugin manager, enter the following command in Terminal: - - git clone https://github.com/github/copilot.vim \ - ~/.config/nvim/pack/github/start/copilot.vim - -{% data reusables.copilot.config-enable-copilot-in-vimneovim %} - -## Installing the {% data variables.product.prodname_copilot %} extension in Vim/Neovim on Windows - -{% data reusables.copilot.install-copilot-in-vimneovim %} - -- To install {% data variables.product.prodname_copilot %} with Vim's built-in plugin manager, enter the following command in Git Bash: - - git clone https://github.com/github/copilot.vim.git \ - $HOME/vimfiles/pack/github/start/copilot.vim - -- To install {% data variables.product.prodname_copilot %} with Neovim's built-in plugin manager, enter the following command in Git Bash: - - git clone https://github.com/github/copilot.vim.git \ - $HOME/AppData/Local/nvim/pack/github/start/copilot.vim - -{% data reusables.copilot.config-enable-copilot-in-vimneovim %} - -## Installing the {% data variables.product.prodname_copilot %} extension in Vim/Neovim on Linux - -{% data reusables.copilot.install-copilot-in-vimneovim %} - -- To install {% data variables.product.prodname_copilot %} with Vim's built-in plugin manager, enter the following command: - - git clone https://github.com/github/copilot.vim \ - ~/.vim/pack/github/start/copilot.vim - -- To install {% data variables.product.prodname_copilot %} with Neovim's built-in plugin manager, enter the following command: - - git clone https://github.com/github/copilot.vim \ - ~/.config/nvim/pack/github/start/copilot.vim - -{% data reusables.copilot.config-enable-copilot-in-vimneovim %} - -## Learning to use {% data variables.product.prodname_copilot %} in Vim/Neovim - -For guidance on using {% data variables.product.prodname_copilot %} in Vim/Neovim, you can view the plugin documentation. To see the documentation, open Vim/Neovim and run the following command: - -```shell -:help copilot -``` - -{% endvimneovim %} - -{% azure_data_studio %} - -## About {% data variables.product.prodname_copilot %} and Azure Data Studio - -{% data reusables.copilot.procedural-intro %} - -If you use Azure Data Studio, you can view and incorporate suggestions from {% data variables.product.prodname_copilot %} directly within the editor. This guide demonstrates how to use {% data variables.product.prodname_copilot %} within Azure Data Studio for macOS, Windows, or Linux. - -## Prerequisites - -{% data reusables.copilot.subscription-prerequisite %} - -- To use {% data variables.product.prodname_copilot %} in Azure Data Studio, you must have Azure Data Studio version 1.44.0 or later installed. For more information, see the [Azure Data Studio download page](https://docs.microsoft.com/sql/azure-data-studio/download-azure-data-studio) in the Azure Data Studio documentation. - -## Installing the {% data variables.product.prodname_copilot %} extension in Azure Data Studio - -To use {% data variables.product.prodname_copilot %}, you must first install the {% data variables.product.prodname_copilot %} extension. - -1. In Azure Data Studio, click the **Extensions** icon in the left-side menu. - - ![Screenshot of the Azure Data Studio left-side menu. The "Extensions" icon is highlighted with an orange outline.](/assets/images/help/copilot/azure-data-studio-extensions-icon.png) - -1. In the "Extensions" tab, search for **{% data variables.product.prodname_copilot %}** and then click **Install**. -1. If a popup window in Azure Data Studio prompts you to sign in to use {% data variables.product.prodname_copilot %}, click **Sign in to {% data variables.product.prodname_dotcom %}** and follow the instructions on screen. - - - If you have previously authorized Azure Data Studio for your account on {% data variables.product.prodname_dotcom %}, {% data variables.product.prodname_copilot %} will be automatically authorized. - - If you don't get the prompt to authorize, you can view notifications by clicking the bell icon in the bottom panel of the Azure Data Studio window. - -1. If you are following the authorization steps, in your browser, {% data variables.product.prodname_dotcom %} will request the necessary permissions for {% data variables.product.prodname_copilot %}. To approve these permissions, click **Authorize Azure Data Studio**. - -## Seeing your first suggestion - -{% data reusables.copilot.code-examples-limitations %} - -{% data variables.product.prodname_copilot %} can provide you with inline suggestions as you create SQL databases in Azure Data Studio. For example, if you're writing a query that joins two tables, {% data variables.product.prodname_copilot_short %} may suggest the join condition from columns in the open editor, other files in the workspace, and common syntax patterns. - -{% data reusables.copilot.create-sql-file %} - -1. In the SQL file, type the following query. {% data variables.product.prodname_copilot %} will automatically suggest a join condition in grayed text. The exact suggestion may vary. - - ```sql copy - SELECT [UserId], [Red], [Orange], [Yellow], [Green], [Blue], [Purple], [Rainbow] - FROM [Tag].[Scoreboard] - INNER JOIN - ``` - -{% data reusables.copilot.accept-suggestion %} - -## Seeing alternative suggestions - -For some suggestions, {% data variables.product.prodname_copilot %} may provide multiple alternatives. You can select which suggestion you want to use, or reject all suggestions. - -{% data reusables.copilot.create-sql-file %} - -1. In the SQL file, type the following query. {% data variables.product.prodname_copilot %} will show you a suggestion. - - ```sql copy - SELECT [UserId], [Red], [Orange], [Yellow], [Green], [Blue], [Purple], [Rainbow] - FROM [Tag].[Scoreboard] - INNER JOIN - ``` - -1. Optionally, you can see alternative suggestions, if any are available. - - | OS | See next suggestion | See previous suggestion | - | :------ | :----------------------------- | :----------------------------- | - | Windows | Alt+[ | Alt+] | - | Linux | Alt+[ | Alt+] | - | macOS | Option+[ | Option+] | - -## Partially accepting suggestions - -You may not want to accept an entire suggestion from {% data variables.product.prodname_copilot %}. You can use keyboard shortcuts to accept either the next word of a suggestion, or the next line. -{% data reusables.copilot.create-sql-file %} - -1. In the SQL file, type the following query. {% data variables.product.prodname_copilot %} will show you a suggestion. - - ```sql copy - SELECT [UserId], [Red], [Orange], [Yellow], [Green], [Blue], [Purple], [Rainbow] - FROM [Tag].[Scoreboard] - INNER JOIN - ``` - -1. If you want to accept only the next word of the suggestion, use one of the following keyboard shortcuts. - - | OS | Accept Next Word | - | :------ | :------------------------------ | - | macOS | Command+ | - | Windows | Control+ | - | Linux | Control+ | - -1. If you want to accept the next line of the suggestion, you will need to set a custom keyboard shortcut for the command `editor.action.inlineSuggest.acceptNextLine`. For more information on setting custom keyboard shortcuts, see "[Keyboard shortcuts in Azure Data Studio](https://learn.microsoft.com/en-us/azure-data-studio/keyboard-shortcuts)" in the Microsoft documentation. -1. Alternatively, you can hover over the suggestion to see the {% data variables.product.prodname_copilot %} command palette for choosing suggestions. - -## Generating code suggestions from comments - -{% data reusables.copilot.generating-suggestions-from-comments %} - -{% data reusables.copilot.create-sql-file %} - -1. In the SQL file, type the following query and comment. {% data variables.product.prodname_copilot %} will suggest an implementation of the query. - - ```sql copy - SELECT TokenColor, COUNT(UserID) AS UserCount - FROM Tag.Users - GROUP BY TokenColor - -- pivot that query on tokencolor for Purple, Blue, Green, Yellow, Orange, Red - -- and rename the columns to match the colors - SELECT [Purple], [Blue], [Green], [Yellow], [Orange], [Red] - ``` - -{% data reusables.copilot.enabling-or-disabling-in-ads %} - -{% endazure_data_studio %} - -{% data reusables.copilot.enabling-or-disabling-in-mobile %} - -## Next steps - -{% data reusables.copilot.next-steps %} - -- [{% data variables.product.prodname_copilot %}](https://copilot.github.com/): See practical examples of how {% data variables.product.prodname_copilot %} can help you work. -- "[AUTOTITLE](/copilot/github-copilot-chat/copilot-chat-in-ides/using-github-copilot-chat-in-your-ide)"{% ifversion ghec %} and "[AUTOTITLE](/copilot/github-copilot-chat/copilot-chat-in-github/using-github-copilot-chat-in-githubcom)"{% endif %}: Find out how to ask {% data variables.product.prodname_copilot %} for information and assistance. -- "[AUTOTITLE](/copilot/github-copilot-chat/copilot-chat-in-github-mobile/using-github-copilot-chat-in-github-mobile)": Learn how to use {% data variables.product.prodname_copilot_chat_short %} in {% data variables.product.prodname_mobile %}. -- "[AUTOTITLE](/copilot/configuring-github-copilot)": These guides provide details on how to configure {% data variables.product.prodname_copilot %} to your personal preferences. -- "[AUTOTITLE](/billing/managing-billing-for-github-copilot)": Learn more about billing for {% data variables.product.prodname_copilot %}. -- "[AUTOTITLE](/copilot/troubleshooting-github-copilot)": These guides provide information for troubleshooting {% data variables.product.prodname_copilot %}. - -## Further reading - -- [The {% data variables.product.prodname_copilot %} website](https://copilot.github.com/) -- "[AUTOTITLE](/copilot/copilot-individual/about-github-copilot-individual)" -- "[AUTOTITLE](/copilot/copilot-business/about-github-copilot-business)" -{% ifversion ghec %}- "[AUTOTITLE](/copilot/github-copilot-enterprise/overview/about-github-copilot-enterprise)"{% endif %} diff --git a/content/copilot/using-github-copilot/index.md b/content/copilot/using-github-copilot/index.md index 4f4ea7c501..04749d9ce7 100644 --- a/content/copilot/using-github-copilot/index.md +++ b/content/copilot/using-github-copilot/index.md @@ -7,6 +7,7 @@ versions: topics: - Copilot children: - - /getting-started-with-github-copilot + - /using-github-copilot-code-suggestions-in-your-editor - /finding-public-code-that-matches-github-copilot-suggestions --- + diff --git a/content/copilot/using-github-copilot/using-github-copilot-code-suggestions-in-your-editor.md b/content/copilot/using-github-copilot/using-github-copilot-code-suggestions-in-your-editor.md new file mode 100644 index 0000000000..e02c68d96d --- /dev/null +++ b/content/copilot/using-github-copilot/using-github-copilot-code-suggestions-in-your-editor.md @@ -0,0 +1,434 @@ +--- +title: Using GitHub Copilot code suggestions in your editor +shortTitle: Get code suggestions +intro: 'Use {% data variables.product.prodname_copilot %} to get code suggestions in your editor.' +redirect_from: + - /copilot/getting-started-with-github-copilot + - /github/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code + - /github/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide + - /github/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-neovim + - /github/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio + - /copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code + - /copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide + - /copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-neovim + - /copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio + - /copilot/using-github-copilot/getting-started-with-github-copilot +versions: + feature: copilot +defaultTool: vscode +topics: + - Copilot +--- + +Start a free trial {% octicon "link-external" height:16 %} + +{% jetbrains %} + +## About {% data variables.product.prodname_copilot %} and JetBrains IDEs + +This guide demonstrates how to get coding suggestions from {% data variables.product.prodname_copilot %} in a JetBrains IDE. To see instructions for other popular coding environments, use the tool switcher at the top of the page. + +The examples in this guide use Java, however other languages will work similarly. {% data reusables.copilot.supported-languages %} + +## Prerequisites + +- **Subscription to {% data variables.product.prodname_copilot_short %}**. To use {% data variables.product.prodname_copilot %} in JetBrains, you must have an active {% data variables.product.prodname_copilot %} subscription. {% data reusables.copilot.subscription-prerequisite %} + +- **Compatible JetBrains IDE**. To use {% data variables.product.prodname_copilot %} in JetBrains, you must have a compatible JetBrains IDE installed. {% data variables.product.prodname_copilot %} is compatible with the following IDEs: + + - IntelliJ IDEA (Ultimate, Community, Educational) + - Android Studio + - AppCode + - CLion + - Code With Me Guest + - DataGrip + - DataSpell + - GoLand + - JetBrains Client + - MPS + - PhpStorm + - PyCharm (Professional, Community, Educational) + - Rider + - RubyMine + - RustRover + - WebStorm + + For more information, see the [JetBrains IDEs](https://www.jetbrains.com/products/) tool finder. + +- **{% data variables.product.prodname_copilot %} plugin for JetBrains**. To use {% data variables.product.prodname_copilot %} in JetBrains, you must install the [{% data variables.product.prodname_copilot %} plugin](https://plugins.jetbrains.com/plugin/17718-github-copilot). For more information, see "[AUTOTITLE](/copilot/configuring-github-copilot/installing-the-github-copilot-extension-in-your-environment)." + +## Getting code suggestions + +{% data variables.product.prodname_copilot %} offers coding suggestions as you type. For example, in a Java file, create a class by typing `class Test`. + +{% data variables.product.prodname_copilot %} will automatically suggest a class body in grayed text. {% data reusables.copilot.accept-suggestion %} + +You can also describe something you want to do using natural language within a comment, and {% data variables.product.prodname_copilot_short %} will suggest the code to accomplish your goal. For example, type this comment in a Java file: + +```java copy +// find all images without alternate text +// and give them a red border +void process () { +``` + +{% data variables.product.prodname_copilot %} will automatically suggest code. {% data reusables.copilot.accept-suggestion %} + +{% data variables.product.prodname_copilot %} will attempt to match the context and style of your code. You can always edit the suggested code. + +> [!TIP] +> If you receive limited or no suggestions from {% data variables.product.prodname_copilot_short %}, you may have duplication detection enabled. For more information about duplication detection, see "[AUTOTITLE](/copilot/configuring-github-copilot/configuring-github-copilot-settings-on-githubcom#enabling-or-disabling-duplication-detection)." + +## Showing alternative suggestions + +{% data reusables.copilot.alternative-suggestions %} + +For example, type the following line in a Java file, and press Enter: + +{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %} + +{% data variables.product.prodname_copilot %} will show you a suggestion. + +Now hover over the suggestion to show the {% data variables.product.prodname_copilot %} control for choosing suggestions. To display next or previous suggestions, click the forward or back arrow button in the control. + +You can also use keyboard shortcuts to show alternative suggestions: + +| OS | See next suggestion | See previous suggestion | +| :------ | :----------------------------- | :----------------------------- | +| macOS | Option+] | Option+[ | +| Windows or Linux | Alt+] | Alt+[ | + +{% data reusables.copilot.accept-or-reject-suggestion %} + +## Showing multiple suggestions in a new tab + +{% data reusables.copilot.suggestions-new-tab %} + +For example, type the following line in a Java file: + +{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %} + +{% data variables.product.prodname_copilot %} will show you a suggestion. + +To open a new tab with multiple additional suggestions, use the following keyboard shortcut, then click **Open GitHub Copilot**: + +| OS | Open multiple suggestions | +| :- | :- | +|macOS|Command+Shift+A| +|Windows or Linux |Ctrl+Enter| + +To accept a suggestion, below the suggestion, click **Accept suggestion NUMBER**. To reject all suggestions, close the tab. + +## Accepting partial suggestions + +If you don't want to accept an entire suggestion from {% data variables.product.prodname_copilot %}, you can accept the next word or the next line of a suggestion. + +For example, type the following line in a Java file: + +{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %} + +{% data variables.product.prodname_copilot %} will show a suggestion in grayed text. The exact suggestion may vary. + +Now hover over the suggestion to show the {% data variables.product.prodname_copilot %} control for choosing suggestions. To accept only the next word of the suggestion, click **Accept Word** in the control. + +Alternatively, you can use a keyboard shortcut to accept the next word of a suggestion: + +| OS | Accept Next Word | Accept Next Line | +| :- | :- | :- | +|macOS|Command+|Command+Control+| +|Windows or Linux|Control+|Control+Alt+| + +If you want to accept the next line of a suggestion, you will need to set a custom keyboard shortcut for the command `editor.action.inlineSuggest.acceptNextLine`. For more information on setting custom keyboard shortcuts, see "[AUTOTITLE](/copilot/configuring-github-copilot/configuring-github-copilot-in-your-environment)." + +{% endjetbrains %} + +{% visualstudio %} + +## About {% data variables.product.prodname_copilot %} and {% data variables.product.prodname_vs %} + +This guide demonstrates how to get coding suggestions from {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %} for Windows. To see instructions for other popular coding environments, use the tool switcher at the top of the page. + +The examples in this guide use C#, however other languages will work similarly. {% data reusables.copilot.supported-languages %} + +## Prerequisites + +- **Subscription to {% data variables.product.prodname_copilot_short %}**. To use {% data variables.product.prodname_copilot %} in Visual Studio, you must have an active {% data variables.product.prodname_copilot %} subscription. {% data reusables.copilot.subscription-prerequisite %} + +- **Compatible version of {% data variables.product.prodname_vs %}**. To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %}, you must have version 2022 17.6 or later of {% data variables.product.prodname_vs %} for Windows installed. Note that {% data variables.product.prodname_copilot %} is not currently available in {% data variables.product.prodname_vs %} for Mac. For more information, see "[Install {% data variables.product.prodname_vs %}](https://learn.microsoft.com/en-us/visualstudio/install/install-visual-studio)" in the Microsoft documentation. + +- **{% data variables.product.prodname_copilot %} extension for {% data variables.product.prodname_vs %}**. {% data reusables.copilot.link-to-vs-install-docs %} + +## Getting code suggestions + +{% data variables.product.prodname_copilot %} offers coding suggestions as you type. For example, type this function +signature in a C# file: + +```csharp copy +int CalculateDaysBetweenDates( +``` + +{% data variables.product.prodname_copilot %} will automatically suggest an entire function body in grayed text. {% data reusables.copilot.accept-suggestion %} + +You can also describe something you want to do using natural language within a comment, and {% data variables.product.prodname_copilot_short %} will suggest the code to accomplish your goal. For example, type this comment in the C# file: + +```csharp copy +using System.Xml.Linq; + +var doc = XDocument.Load("index.xhml"); + +// find all images +``` + +{% data variables.product.prodname_copilot %} will suggest an implementation of the function. {% data reusables.copilot.accept-suggestion %} + +> [!TIP] +> If you receive limited or no suggestions from {% data variables.product.prodname_copilot_short %}, you may have duplication detection enabled. For more information about duplication detection, see "[AUTOTITLE](/copilot/configuring-github-copilot/configuring-github-copilot-settings-on-githubcom#enabling-or-disabling-duplication-detection)." + +## Showing alternative suggestions + +{% data reusables.copilot.alternative-suggestions %} + +For example, type this function signature in a C# file: + +```csharp copy +int CalculateDaysBetweenDates( +``` + +{% data variables.product.prodname_copilot %} will show you a suggestion. + +Now hover over the suggestion to show the {% data variables.product.prodname_copilot %} control for choosing suggestions. To display next or previous suggestions, click the forward or back arrow button in the control. + +Alternatively, you can show alternate suggestions by pressing Alt+. (or Alt+,) on your keyboard. + +{% data reusables.copilot.accept-or-reject-suggestion %} + +{% endvisualstudio %} + +{% vscode %} + +## About {% data variables.product.prodname_copilot %} and {% data variables.product.prodname_vscode %} + +This guide demonstrates how to get coding suggestions from {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}. To see instructions for other popular coding environments, use the tool switcher at the top of the page. + +The examples in this guide use JavaScript, however other languages will work similarly. {% data reusables.copilot.supported-languages %} + +## Prerequisites + +- **Subscription to {% data variables.product.prodname_copilot_short %}**. To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, you must have an active {% data variables.product.prodname_copilot %} subscription. {% data reusables.copilot.subscription-prerequisite %} + +- **{% data variables.product.prodname_vscode %}**. To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, you must have {% data variables.product.prodname_vscode %} installed. For more information, see the [{% data variables.product.prodname_vscode %} download page](https://code.visualstudio.com/Download). + +- **{% data variables.product.prodname_copilot_short %} extension for {% data variables.product.prodname_vscode %}**. To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, you must install the [{% data variables.product.prodname_copilot %} extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot). For more information, see "[Set up {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}](https://code.visualstudio.com/docs/copilot/setup)" in the {% data variables.product.prodname_vscode %} documentation. + +## Getting code suggestions + +{% data variables.product.prodname_copilot %} offers coding suggestions as you type. For example, type this function header in a JavaScript file: + +```javascript copy +function calculateDaysBetweenDates(begin, end) { +``` + +{% data variables.product.prodname_copilot %} will automatically suggest the rest of the function. {% data reusables.copilot.accept-suggestion %} + +You can also describe something you want to do using natural language within a comment, and {% data variables.product.prodname_copilot_short %} will suggest the code to accomplish your goal. For example, type this comment in a JavaScript file: + +```javascript copy +// write a function to +// find all images without alternate text +// and give them a red border +``` + +{% data variables.product.prodname_copilot %} will automatically suggest code. {% data reusables.copilot.accept-suggestion %} + +> [!TIP] +> If you receive limited or no suggestions from {% data variables.product.prodname_copilot_short %}, you may have duplication detection enabled. For more information about duplication detection, see "[AUTOTITLE](/copilot/configuring-github-copilot/configuring-github-copilot-settings-on-githubcom#enabling-or-disabling-duplication-detection)." + +## Showing alternative suggestions + +{% data reusables.copilot.alternative-suggestions %} + +For example, type this function header in a JavaScript file, and press Enter: + +```javascript copy +function calculateDaysBetweenDates(begin, end) { +``` + +{% data variables.product.prodname_copilot %} will show you a suggestion. + +Now hover over the suggestion to show the {% data variables.product.prodname_copilot %} control for choosing suggestions. To display next or previous suggestions, click the forward or back arrow button in the control. + +You can also use keyboard shortcuts to show alternative suggestions: + +| OS | See next suggestion | See previous suggestion | +| :------ | :---------------------------------------- | :---------------------------------------- | +| macOS | Option (⌥) or Alt+] | Option (⌥) or Alt+[ | +| Windows or Linux | Alt+] | Alt+[ | + +{% data reusables.copilot.accept-or-reject-suggestion %} + +## Showing multiple suggestions in a new tab + +{% data reusables.copilot.suggestions-new-tab %} + +For example, type this function header in a JavaScript file, and press Enter: + +```javascript copy +function calculateDaysBetweenDates(begin, end) { +``` + +{% data variables.product.prodname_copilot %} will show you a suggestion. Now press Ctrl+Enter to open a new tab with multiple additional options. + +To accept a suggestion, below the suggestion, click **Accept suggestion NUMBER**. To reject all suggestions, close the tab. + +## Accepting partial suggestions + +If you don't want to accept an entire suggestion from {% data variables.product.prodname_copilot %}, you can accept the next word or the next line of a suggestion. + +For example, type this function header in a JavaScript file, and press Enter: + +```javascript copy +function calculateDaysBetweenDates(begin, end) { +``` + +{% data variables.product.prodname_copilot %} will automatically suggest an entire function body in grayed text. The exact suggestion may vary. + +Now hover over the suggestion to show the {% data variables.product.prodname_copilot %} control for choosing suggestions. To accept only the next word of the suggestion, click **Accept Word** in the control. + +Alternatively, you can use a keyboard shortcut to accept the next word of a suggestion: + +| OS | Accept Next Word | +| :- | :- | +|macOS|Command+| +|Windows or Linux |Control+| + +If you want to accept the next line of a suggestion, you will need to set a custom keyboard shortcut for the command `editor.action.inlineSuggest.acceptNextLine`. For more information on setting custom keyboard shortcuts, see "[AUTOTITLE](/copilot/configuring-github-copilot/configuring-github-copilot-in-your-environment)." + +{% endvscode %} + +{% vimneovim %} + +## About {% data variables.product.prodname_copilot %} and Vim/Neovim + +This guide demonstrates how to get coding suggestions from {% data variables.product.prodname_copilot %} in Vim/Neovim. To see instructions for other popular coding environments, use the tool switcher at the top of the page. + +## Prerequisites + +- **Subscription to {% data variables.product.prodname_copilot_short %}**. To use {% data variables.product.prodname_copilot %} in Vim/Neovim, you must have an active {% data variables.product.prodname_copilot %} subscription. {% data reusables.copilot.subscription-prerequisite %} + +- **Compatible version of Vim/Neovim**. To use {% data variables.product.prodname_copilot %} in Vim/Neovim you must have Vim version 9.0.0185 / Neovim version 0.6 or above and Node.js version 18 or above installed. For more information, see the [Vim](https://vimhelp.org/) / [Neovim documentation](https://neovim.io/doc/) and the [Node.js website](https://nodejs.org/en/). + +- **{% data variables.product.prodname_copilot %} extension for Vim/Neovim**. To use {% data variables.product.prodname_copilot %} in Vim/Neovim, you must install the {% data variables.product.prodname_copilot %} plugin. For more information, see "[AUTOTITLE](/copilot/configuring-github-copilot/installing-the-github-copilot-extension-in-your-environment)." + +## Learning to use {% data variables.product.prodname_copilot %} in Vim/Neovim + +{% data variables.product.prodname_copilot %} provides suggestions inline as you type in Vim/Neovim. To accept a suggestion, press the tab key. + +For more information and guidance on using {% data variables.product.prodname_copilot %} in Vim/Neovim run the following command to view the plugin documentation: + +```shell copy +:help copilot +``` + +{% endvimneovim %} + +{% azure_data_studio %} + +## About {% data variables.product.prodname_copilot %} and Azure Data Studio + +This guide demonstrates how to get coding suggestions from {% data variables.product.prodname_copilot %} in Azure Data Studio. To see instructions for other popular coding environments, use the tool switcher at the top of the page. + +## Prerequisites + +- **Subscription to {% data variables.product.prodname_copilot_short %}**. To use {% data variables.product.prodname_copilot %} in Azure Data Studio, you must have an active {% data variables.product.prodname_copilot %} subscription. {% data reusables.copilot.subscription-prerequisite %} + +- **Compatible version of Azure Data Studio**. To use {% data variables.product.prodname_copilot %} in Azure Data Studio, you must have Azure Data Studio version 1.44.0 or later installed. For more information, see the [Azure Data Studio download page](https://docs.microsoft.com/sql/azure-data-studio/download-azure-data-studio) in the Azure Data Studio documentation. + +- **{% data variables.product.prodname_copilot %} extension for Azure Data Studio**. To use {% data variables.product.prodname_copilot %} in Azure Data Studio, you must install the {% data variables.product.prodname_copilot %} extension. For more information, see "[AUTOTITLE](/copilot/configuring-github-copilot/installing-the-github-copilot-extension-in-your-environment)." + +## Getting code suggestions + +{% data variables.product.prodname_copilot %} can provide you with inline suggestions as you create SQL databases in Azure Data Studio. For example, if you're writing a query that joins two tables, {% data variables.product.prodname_copilot_short %} may suggest the join condition from columns in the open editor, other files in the workspace, and common syntax patterns. + +In a SQL file, type the following query: + +```sql copy +SELECT [UserId], [Red], [Orange], [Yellow], [Green], [Blue], [Purple], [Rainbow] +FROM [Tag].[Scoreboard] +INNER JOIN +``` + +{% data variables.product.prodname_copilot %} will automatically suggest a join condition in grayed text. The exact suggestion may vary. {% data reusables.copilot.accept-suggestion %} + +You can also describe something you want to do using natural language within a comment, and {% data variables.product.prodname_copilot_short %} will suggest the code to accomplish your goal. For example, type this comment in a SQL file: + +```sql copy +SELECT TokenColor, COUNT(UserID) AS UserCount +FROM Tag.Users +GROUP BY TokenColor +-- pivot that query on tokencolor for Purple, Blue, Green, Yellow, Orange, Red +-- and rename the columns to match the colors +SELECT [Purple], [Blue], [Green], [Yellow], [Orange], [Red] +``` + +{% data variables.product.prodname_copilot %} will automatically suggest code. {% data reusables.copilot.accept-suggestion %} + + > [!TIP] + > If you receive limited or no suggestions from {% data variables.product.prodname_copilot_short %}, you may have duplication detection enabled. For more information on duplication detection, see "[AUTOTITLE](/copilot/configuring-github-copilot/configuring-github-copilot-settings-on-githubcom#enabling-or-disabling-duplication-detection)." + +## Showing alternative suggestions + +For some suggestions, {% data variables.product.prodname_copilot %} may provide multiple alternatives. You can select which suggestion you want to use, or reject all suggestions. + +For example, type this query in a SQL file: + +```sql copy +SELECT [UserId], [Red], [Orange], [Yellow], [Green], [Blue], [Purple], [Rainbow] +FROM [Tag].[Scoreboard] +INNER JOIN +``` + +{% data variables.product.prodname_copilot %} will show you a suggestion. + +Now hover over the suggestion to show the {% data variables.product.prodname_copilot %} control for choosing suggestions. To display next or previous suggestions, click the forward or back arrow button in the control. + +You can also use keyboard shortcuts to show alternative suggestions: + +| OS | See next suggestion | See previous suggestion | +| :------ | :----------------------------- | :----------------------------- | +| macOS | Option+[ | Option+] | +| Windows or Linux | Alt+[ | Alt+] | + +To accept a suggestion, click "Accept" in the {% data variables.product.prodname_copilot_short %} control, or press Tab. To reject all suggestions, press Esc. + +## Accepting partial suggestions + +If you don't want to accept an entire suggestion from {% data variables.product.prodname_copilot %}, you can accept the next word or the next line of a suggestion. + +For example, type this query in a SQL file: + +```sql copy +SELECT [UserId], [Red], [Orange], [Yellow], [Green], [Blue], [Purple], [Rainbow] +FROM [Tag].[Scoreboard] +INNER JOIN +``` + +{% data variables.product.prodname_copilot %} will show you a suggestion in grayed text. The exact suggestion may vary. + +Now hover over the suggestion to show the {% data variables.product.prodname_copilot %} control for choosing suggestions. To accept only the next word of the suggestion, click **Accept Word** in the control. + +Alternatively, you can use a keyboard shortcut to accept the next word of a suggestion: + +| OS | Accept Next Word | +| :------ | :------------------------------ | +| macOS | Command+ | +| Windows or Linux | Control+ | + +If you want to accept the next line of the suggestion, you will need to set a custom keyboard shortcut for the command `editor.action.inlineSuggest.acceptNextLine`. For more information on setting custom keyboard shortcuts, see "[Keyboard shortcuts in Azure Data Studio](https://learn.microsoft.com/en-us/azure-data-studio/keyboard-shortcuts)" in the Microsoft documentation. + +{% endazure_data_studio %} + +## Next steps + +- **Configure {% data variables.product.prodname_copilot_short %} in your editor** - You can enable or disable {% data variables.product.prodname_copilot %} from within your editor, and create your own preferred keyboard shortcuts for {% data variables.product.prodname_copilot_short %}. See "[AUTOTITLE](/copilot/configuring-github-copilot/configuring-github-copilot-in-your-environment)." +- **Get started with {% data variables.product.prodname_copilot_chat %}** - Learn how to ask {% data variables.product.prodname_copilot_short %} for information and assistance, using {% data variables.product.prodname_copilot_chat %}. See "[AUTOTITLE](/copilot/github-copilot-chat/using-github-copilot-chat-in-your-ide)"{% ifversion ghec %} and "[AUTOTITLE](/copilot/github-copilot-enterprise/copilot-chat-in-github/using-github-copilot-chat-in-githubcom)"{% endif %}. +- **Use {% data variables.product.prodname_copilot_short %} like a pro** - Learn how to write effective prompts for {% data variables.product.prodname_copilot %}. See "[How to use GitHub Copilot: Prompts, tips, and use cases](https://github.blog/2023-06-20-how-to-write-better-prompts-for-github-copilot/)" in {% data variables.product.prodname_blog %}. +- **Troubleshoot issues** - Learn more about how to troubleshoot common issues with {% data variables.product.prodname_copilot %}. See "[AUTOTITLE](/copilot/troubleshooting-github-copilot)." diff --git a/content/index.md b/content/index.md index af80373bd7..7178513cb7 100644 --- a/content/index.md +++ b/content/index.md @@ -9,7 +9,7 @@ featuredLinks: popular: - /pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests - /authentication - - /copilot/using-github-copilot/getting-started-with-github-copilot + - /copilot/using-github-copilot/using-github-copilot-code-suggestions-in-your-editor - /get-started/getting-started-with-git/managing-remote-repositories - /pages redirect_from: @@ -169,3 +169,4 @@ externalProducts: href: 'https://docs.npmjs.com/' external: true --- + diff --git a/data/reusables/copilot/accept-or-reject-suggestion.md b/data/reusables/copilot/accept-or-reject-suggestion.md index 56cc4ec30a..2d59ba18ec 100644 --- a/data/reusables/copilot/accept-or-reject-suggestion.md +++ b/data/reusables/copilot/accept-or-reject-suggestion.md @@ -1 +1 @@ -1. To accept a suggestion, press Tab. To reject all suggestions, press Esc. +To accept a suggestion, click "Accept" in the {% data variables.product.prodname_copilot_short %} command palette, or press Tab. To reject all suggestions, press Esc. diff --git a/data/reusables/copilot/accept-suggestion.md b/data/reusables/copilot/accept-suggestion.md index 4882c5d748..872f0de44a 100644 --- a/data/reusables/copilot/accept-suggestion.md +++ b/data/reusables/copilot/accept-suggestion.md @@ -1 +1 @@ -1. To accept the suggestion, press Tab. +To accept the suggestion, press Tab. diff --git a/data/reusables/copilot/config-enable-copilot-in-vimneovim.md b/data/reusables/copilot/config-enable-copilot-in-vimneovim.md index d0b2c9d85c..4766f4e0c4 100644 --- a/data/reusables/copilot/config-enable-copilot-in-vimneovim.md +++ b/data/reusables/copilot/config-enable-copilot-in-vimneovim.md @@ -1,11 +1,11 @@ 1. To configure {% data variables.product.prodname_copilot %}, open Vim/Neovim and enter the following command. - - ```shell + + ```shell copy :Copilot setup ``` - + 1. Enable {% data variables.product.prodname_copilot %} in your Vim/Neovim configuration, or with the Vim/Neovim command. - - ```shell + + ```shell copy :Copilot enable ``` diff --git a/data/reusables/copilot/enabling-or-disabling-in-mobile.md b/data/reusables/copilot/enabling-or-disabling-in-mobile.md deleted file mode 100644 index 1b406486e0..0000000000 --- a/data/reusables/copilot/enabling-or-disabling-in-mobile.md +++ /dev/null @@ -1,10 +0,0 @@ -## Enabling or disabling {% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_mobile %} - -You can enable or disable all {% data variables.product.prodname_copilot_short %} features from within {% data variables.product.prodname_mobile %} for that specific device. - -1. In the bottom menu, tap **Profile**. -1. To view your settings, tap {% octicon "gear" aria-label="The Gear icon" %}. -1. Tap "{% data variables.product.prodname_copilot_short %}". -1. Next to "{% data variables.product.prodname_copilot_short %}", use the toggle to enable or disable {% data variables.product.prodname_copilot_short %} features on that device. - -This setting currently only affects {% data variables.product.prodname_copilot_mobile_short %}. diff --git a/data/reusables/copilot/install-copilot-in-vimneovim.md b/data/reusables/copilot/install-copilot-in-vimneovim.md deleted file mode 100644 index a71f76fd1e..0000000000 --- a/data/reusables/copilot/install-copilot-in-vimneovim.md +++ /dev/null @@ -1 +0,0 @@ -1. {% data variables.product.prodname_dotcom %} recommends that you install the {% data variables.product.prodname_copilot %} plugin with Vim/Neovim's built-in plugin manager. Alternatively, you can use a plugin manager of your choice to install `github/copilot.vim`. diff --git a/data/reusables/copilot/link-to-vs-install-docs.md b/data/reusables/copilot/link-to-vs-install-docs.md new file mode 100644 index 0000000000..04353eb60f --- /dev/null +++ b/data/reusables/copilot/link-to-vs-install-docs.md @@ -0,0 +1 @@ +For instructions on how to install the {% data variables.product.prodname_copilot_short %} extension, see "[Install GitHub Copilot in Visual Studio](https://learn.microsoft.com/visualstudio/ide/visual-studio-github-copilot-install-and-states)" in the Microsoft documentation. diff --git a/data/reusables/copilot/next-steps.md b/data/reusables/copilot/next-steps.md deleted file mode 100644 index 32afe026ec..0000000000 --- a/data/reusables/copilot/next-steps.md +++ /dev/null @@ -1 +0,0 @@ -You successfully installed {% data variables.product.prodname_copilot %} and received your first suggestion, but that's just the beginning! Here are some helpful resources for taking your next steps with {% data variables.product.prodname_copilot %}. diff --git a/data/reusables/copilot/procedural-intro.md b/data/reusables/copilot/procedural-intro.md index a5079bf305..730c4680c9 100644 --- a/data/reusables/copilot/procedural-intro.md +++ b/data/reusables/copilot/procedural-intro.md @@ -1 +1 @@ -{% data variables.product.prodname_copilot %} provides autocomplete-style suggestions from an AI pair programmer as you code. For more information, see "[AUTOTITLE](/copilot/overview-of-github-copilot/about-github-copilot-individual)." +{% data variables.product.prodname_copilot %} offers coding suggestions as you type in your coding environment. For more information about other things that {% data variables.product.prodname_copilot_short %} can do, see "[AUTOTITLE](/copilot/about-github-copilot)." diff --git a/data/reusables/copilot/subscription-prerequisite.md b/data/reusables/copilot/subscription-prerequisite.md index 081efb3b4a..34dd2e4861 100644 --- a/data/reusables/copilot/subscription-prerequisite.md +++ b/data/reusables/copilot/subscription-prerequisite.md @@ -1 +1 @@ -- To use {% data variables.product.prodname_copilot %} you must have an active {% data variables.product.prodname_copilot %} subscription. For more information, see "[AUTOTITLE](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)." +For information about how to get access to {% data variables.product.prodname_copilot_short %}, see "[AUTOTITLE](/copilot/about-github-copilot#getting-access-to-github-copilot)." diff --git a/data/reusables/copilot/suggestions-new-tab.md b/data/reusables/copilot/suggestions-new-tab.md index 7f89c6b13f..e672da452b 100644 --- a/data/reusables/copilot/suggestions-new-tab.md +++ b/data/reusables/copilot/suggestions-new-tab.md @@ -1 +1 @@ -You may not want any of the initial suggestions {% data variables.product.prodname_copilot %} offers. You can use a keyboard shortcut to prompt {% data variables.product.prodname_copilot %} to show you multiple suggestions in a new tab. +If you don't want to use any of the initial suggestions {% data variables.product.prodname_copilot %} offers, you can show multiple suggestions in a new tab. diff --git a/data/reusables/copilot/supported-languages.md b/data/reusables/copilot/supported-languages.md index fd91a1fb48..96f7354000 100644 --- a/data/reusables/copilot/supported-languages.md +++ b/data/reusables/copilot/supported-languages.md @@ -1 +1 @@ -{% data variables.product.prodname_copilot %} provides suggestions for numerous languages and a wide variety of frameworks, but works especially well for Python, JavaScript, TypeScript, Ruby, Go, C# and C++. {% data variables.product.prodname_copilot %} can also assist in query generation for databases. +{% data variables.product.prodname_copilot %} provides suggestions for numerous languages and a wide variety of frameworks, but works especially well for Python, JavaScript, TypeScript, Ruby, Go, C# and C++. {% data variables.product.prodname_copilot %} can also assist in query generation for databases, or generating suggestions for APIs and frameworks.