Closed MikiVanousek closed 2 years ago
I have the same issue..
This should be fixed as of today. If it's still reproducible after a PackerSync
please reopen.
It would be nice, if the two plugins copilot.lua and copilot-cmp would list steps to verify installation, as I am not even sure where to file this issue.
As a general rule, if LspInfo
shows copilot up and running, copilot.lua is working fine. There are rare exceptions to that rule, which would likely show up in your lsp logfile.
If CmpStatus
is giving unexpected information, then its likely a copilot_cmp issue.
What seems to be the cause of this was a rare exception to the first rule, wherein microsoft made some changes to the backend that caused some difficult to diagnose problems while I've been quite busy with graduation stuff. Thankfully one of the users in copilot.lua came out with a PR after discovering a parameter that is now required. Very sorry for any frustration this may have caused.
Very sorry for any frustration this may have caused.
No worries mate. : )
Unfortunately, with the minimal configuration I specified above, the issue persists. LspInfo
does not show copilot. This means it is a copilot.lua
issue. Should I refile there?
Very sorry for any frustration this may have caused.
No worries mate. : ) Unfortunately, with the minimal configuration I specified above, the issue persists.
LspInfo
does not show copilot. This means it is acopilot.lua
issue. Should I refile there?
Yeah keep this closed and open a new post there. Before that though, try loading copilot.lua on "InsertEnter" and see if that helps. I noticed you don't lazy load at all and you might be hitting some unknown race condition.
@crisidev I fixed it. As I use Lunar Vim, I had to change the package manager path.
require("copilot").setup {
plugin_manager_path = "/home/miki/.local/share/lunarvim" .. "/site/pack/packer",
}
Also, for some reason the cmp configuration does not work if it is run as a packer config argument, it has to be outside it. The entire config looks something like this:
lvim.plugins = {
...
{ "zbirenbaum/copilot.lua",
event = { "VimEnter" },
config = function()
vim.defer_fn(function()
require("copilot").setup {
plugin_manager_path = "/home/miki/.local/share/lunarvim" .. "/site/pack/packer",
}
end, 100)
end,
},
{ "zbirenbaum/copilot-cmp",
after = { "copilot.lua", "nvim-cmp" },
config = function()
end
},
}
vim.builtin.cmp.sources = {
{ name = "copilot", group_index = 2 },
{ name = "nvim_lsp", group_index = 2 },
{ name = "path", group_index = 2 },
{ name = "luasnip", group_index = 2 },
}
Don't forget to quit lvim, PackerSync
, PackerCompile
and quit again.
Nice!! It works perfectly!
I installed according to the instructions. (
~/.config/githubcopilot
exists)Both plugins seem to be installed, but
:CmpInfo
producesIt would be nice, if the two plugins
copilot.lua
andcopilot-cmp
would list steps to verify installation, as I am not even sure where to file this issue.