— Tutorial, Vim, NeoVim, NVim, Github, Copilot, Gerard Altamirano, TheJarX — 1 min read
This week I received an email telling me that I'm in the Github Copilot Technical Preview (whoaaa got tired typing that). Pitifully, ~the hype is sorta gone and~ it said that Copilot was only available in VSCode and JetBrains IDEs. And it's ok, but I use Vim as my main editor (yup I'm that weird dev 🤖; looks cool, though).
Fortunately,today when I woke up and checked my email I found a Github repo that can help me to use Copilot in Vim (well, NeoVim). So let's try it! (literally, I'm writing this and trying the repo, so if you're reading this post means that all went Gucci)
According to the repo's README, we need to install Node.js v12 or newer.
Then install a NeoVim prerelease build. Or in my case I'll use Hombrew:
1brew install neovim --HEAD
github/copilot.vim
using any plugin manager we prefer. Or in my case, directly cloning the repo:1git clone https://github.com/github/copilot.vim.git \2 ~/.config/nvim/pack/github/start/copilot.vim
So now you can open NeoVim and setup Copilot:
1nvim
And then Run :Copilot setup
to setup Copilot (duh).
You'll be ask for login with Github (so they can see you're in the technical preview) with a code that the plugin will provide.
And you'll need to agree the telemetry terms, after you read it carefully (all we know that it's probably you won't read it, but well just tried to sound cool).
And that's it, let's see copilot in action and in High Resolution (read with narrator voice with echo).
Just kidding, let's try it, btw to accept the Copilot suggestion you just need to press Tab
Uhh actually, this seems like code I wrote before
Now I need to customise NeoVim like my Vim