Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add necessary bits to install and enable copilot. #18833

Merged
merged 38 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3a279d8
Add necessary bits to install and enable copilot.
georgalis Jun 28, 2022
d8d9e5f
Add tildie to path for clarity
georgalis Jun 28, 2022
c665136
Update getting-started-with-github-copilot-in-neovim.md
georgalis Jun 28, 2022
0abc792
plugin clarification per @djensenius request
georgalis Jul 27, 2022
800f611
Merge branch 'main' into patch-2
jules-p Aug 9, 2022
03a55b3
Update getting-started-with-github-copilot-in-neovim.md
jules-p Aug 9, 2022
e2d7cc1
Update getting-started-with-github-copilot-in-neovim.md
jules-p Aug 9, 2022
0124e70
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
8cc18da
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
4d8dc46
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
6e116c7
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
6121c1b
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
7b4d0d3
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
335ca3c
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
93ceee5
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
115251d
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
00d7d5a
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
532e5bc
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
08bee99
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
75819c4
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
d617d3e
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
21b82b0
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
2371083
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
d7491d7
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
3aff5b5
Merge branch 'main' into patch-2
jules-p Aug 23, 2022
2c41580
Merge branch 'main' into patch-2
jules-p Aug 23, 2022
66b1d4e
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
e3ccaa7
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
2ee29e3
Merge branch 'main' into patch-2
jules-p Aug 23, 2022
ff9b5d2
Merge branch 'main' into patch-2
jules-p Aug 23, 2022
a1af268
Update content/copilot/getting-started-with-github-copilot/getting-st…
jules-p Aug 23, 2022
c66d493
refactor and simplify setup doc
georgalis Aug 24, 2022
79a3ab8
Update config-enable-copilot-in-neovim.md
jules-p Sep 1, 2022
e512ae8
Update getting-started-with-github-copilot-in-neovim.md
jules-p Sep 1, 2022
973a25d
Update getting-started-with-github-copilot-in-neovim.md
jules-p Sep 1, 2022
b2df6dd
Merge branch 'main' into patch-2
jules-p Sep 1, 2022
ed3e20b
Update getting-started-with-github-copilot-in-neovim.md
jules-p Sep 28, 2022
36d0911
Merge branch 'main' into patch-2
jules-p Oct 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,67 +17,57 @@ If you use a Neovim, you can view and incorporate suggestions from {% data varia

## Prerequisites

To use {% data variables.product.prodname_copilot %} in Neovim you must have Neovim and Node.js version 17 or below installed. For more information, see the [Neovim documentation](https://neovim.io/doc/) and the [Node.js website](https://nodejs.org/en/).
- To use {% data variables.product.prodname_copilot %} you must have an active {% data variables.product.prodname_copilot %} subscription. For more information, see "[About billing for {% data variables.product.prodname_copilot %}](/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot)."

- To use {% data variables.product.prodname_copilot %} in Neovim you must have Neovim and Node.js version 17 or below installed. For more information, see the [Neovim documentation](https://neovim.io/doc/) and the [Node.js website](https://nodejs.org/en/).

## Installing the Neovim extension

{% mac %}

{% data reusables.copilot.install-copilot-in-neovim %}
- To install the {% data variables.product.prodname_copilot %} plugin directly, you must know where Neovim stores plugins. To install the plugin, enter the following command in Terminal.
- 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 \
PATH/TO/NEOVIM/PLUGINS/copilot.vim
```
1. To configure {% data variables.product.prodname_copilot %}, open Neovim and enter the following command.
git clone https://github.com/github/copilot.vim \
~/.config/nvim/pack/github/start/copilot.vim

```
:Copilot setup
```
{% data reusables.copilot.config-enable-copilot-in-neovim %}

{% endmac %}


{% windows %}

{% data reusables.copilot.install-copilot-in-neovim %}
- To install the {% data variables.product.prodname_copilot %} plugin directly, you must know where Neovim stores plugins. To install the plugin, enter the following command in Git Bash.
- 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 \
~/.config/PATH/TO/YOUR/NEOVIM/CONFIG/FILE/copilot.vim
1. To configure {% data variables.product.prodname_copilot %}, open Neovim and enter the following command.
git clone https://github.com/github/copilot.vim.git `
$HOME/AppData/Local/nvim/pack/github/start/copilot.vim

```
:Copilot setup
```
{% data reusables.copilot.config-enable-copilot-in-neovim %}

{% endwindows %}


{% linux %}

{% data reusables.copilot.install-copilot-in-neovim %}
- To install the {% data variables.product.prodname_copilot %} plugin directly, you must know where Neovim stores plugins. To install the plugin, enter the following command in Git Bash.
- 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
Comment on lines +57 to +58
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct path on Windows is ~/AppData/Local/nvim/pack/github/start/copilot.vim. Unfortunately it's not quite a drop-in replacement, as ~ and \ are specific to UNIX shells. In the copilot.vim README, I'm currently suggesting the following PowerShell command:

          git clone https://github.com/github/copilot.vim.git `
            $HOME/AppData/Local/nvim/pack/github/start/copilot.vim


```
git clone https://github.com/github/copilot.vim \
~/.config/PATH/TO/YOUR/NEOVIM/CONFIG/FILE/copilot.vim
```
1. To configure {% data variables.product.prodname_copilot %}, open Neovim and enter the following command.
{% data reusables.copilot.config-enable-copilot-in-neovim %}

```
:Copilot setup
```
{% endlinux %}

## Learning to use {% data variables.product.prodname_copilot %} in Neovim

For guidance on using {% data variables.product.prodname_copilot %} in Neovim, you can view the plugin documentation. To see the documentation, open Neovim and run the following command.
```
:help copilot
```

```
:help copilot
```

## Further reading

Expand Down
11 changes: 11 additions & 0 deletions data/reusables/copilot/config-enable-copilot-in-neovim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
1. To configure {% data variables.product.prodname_copilot %}, open Neovim and enter the following command.

```
:Copilot setup
```

1. Enable {% data variables.product.prodname_copilot %} in your Neovim configuration, or with the Neovim command.

```
:Copilot enable
```
3 changes: 1 addition & 2 deletions data/reusables/copilot/install-copilot-in-neovim.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
1. To use {% data variables.product.prodname_copilot %} in Neovim, install the {% data variables.product.prodname_copilot %} plugin. You can either install the plugin from a plugin manager or directly.
- If you use a plugin manager like vim-plug or packer.nvim, use the plugin manager to install `github/copilot.vim`. For more information, see the documentation for the plugin manager. For example, you can see the documentation for [vim-plug](https://github.com/junegunn/vim-plug) or [packer.nvim](https://github.com/wbthomason/packer.nvim).
1. {% data variables.product.prodname_dotcom %} recommends that you install the {% data variables.product.prodname_copilot %} plugin with Neovim's built-in plugin manager. Alternatively, you can use a plugin manager of your choice to install `github/copilot.vim`.