kickstart.nvim icon indicating copy to clipboard operation
kickstart.nvim copied to clipboard

Github Copilot plugin is not installing

Open haseeb-heaven opened this issue 2 years ago • 1 comments

Describe the bug The Github co-pilot plugin is not installing when using LUA based configuration.

To Reproduce Steps to reproduce the behavior:

  1. Setup "init.lua" config from this Repo.
  2. Go to Copilot Repo - VIM
  3. Now install it.
  4. Now open Neovim editor enter command mode and type :Copilot setup
  5. See the error Copilot setup Command not found.

Desktop (please complete the following information):

  • OS: MacOS.
  • Terminal: ZSH,iTerm.

** Neovim Version **

  • Output of running :version from inside of neovim: :version
NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.8.3/share/nvim"

Run :checkhealth for more info

haseeb-heaven avatar Feb 19 '23 05:02 haseeb-heaven

I'm having this exact issue across all of the devices I've tested it with. (3x Linux 1x windows)

Same setup as this user but instead I use alacrity and fish.

Zephira58 avatar Feb 19 '23 16:02 Zephira58

Note to user @haseeb-heaven i'm not 100% sure on this so someone correct me if i'm wrong. But i belive the reason that the method didnt work for both of us is due to the fact that kickstart uses the lazy plugin manager.

I was able to get copilot working on all my machines by going into my init.lua file and going to any location within the "require('lazy').setup({" bracket. And entering "'github/copilot.vim'," Heres a screenshot for reference. image

Try it out and see if the method works for you too.

Zephira58 avatar Feb 19 '23 18:02 Zephira58

@Xanthus58 Thanks i will try and let you know.

haseeb-heaven avatar Feb 19 '23 18:02 haseeb-heaven

Solution mentioned by @Xanthus58 fixed this issue.

haseeb-heaven avatar Feb 19 '23 18:02 haseeb-heaven

Does it show prompts to you so you an tab on them? For me it doesn't, only when running :Copilot, it shows 10 possible answers...

alexbaikal avatar Feb 24 '23 17:02 alexbaikal

You have to run command Copilot setup to set it up and then it will start running.

haseeb-heaven avatar Feb 24 '23 17:02 haseeb-heaven

I've set it up, had to paste this in nvim init.lua: vim.g.copilot_assume_mapped = true

alexbaikal avatar Feb 25 '23 04:02 alexbaikal

No i didnt had to do that step

haseeb-heaven avatar Feb 25 '23 04:02 haseeb-heaven

I've set it up, had to paste this in nvim init.lua: vim.g.copilot_assume_mapped = true

I needed this line as well otherwise no inline suggestions would show up. Just curious @alexbaikal, where did you find this setting? I'm not finding any documentation about it.

klcantrell avatar Oct 09 '23 01:10 klcantrell

Hi guys! I just started using Copilot with Neovim myself, and I found what I see as a cleaner solution:

https://github.com/feoh/git_dotfiles/blob/master/.config/nvim/lua/custom/plugins/copilot.lua

Note that this also uses Ctrl-j as the "OK Copilot give me a suggestion" because I couldn't get copilot working with kickstart by default as copilot status would say that it's disabled by default since tab was already in use.

I suspect we could somehow integrate with cmp instead, but I'm happy to be explicit and use Ctrl-j when I want Copilot for now.

feoh avatar Feb 08 '24 04:02 feoh