This repository transforms https://github.com/zbirenbaum/copilot.lua into a cmp source.
Copilot suggestions will automatically be loaded into your cmp menu as snippets and display their full contents when a copilot suggestion is hovered.
If you already have copilot.lua installed, you can install this plugin with packer as you would any other with the following code:
use {
"zbirenbaum/copilot-cmp",
after = { "copilot.lua", "nvim-cmp" },
}
If you do not have copilot.lua installed, go to https://github.com/zbirenbaum/copilot.lua and follow the instructions there before installing this one
To link cmp with this source, simply go into your cmp configuration file and include { name = "copilot" }
under your sources
Here is an example of what it should look like:
cmp.setup {
...
sources = {
{ name = "copilot", group_index = 2 },
{ name = "nvim_lsp", group_index = 2 },
{ name = "path", group_index = 2 },
{ name = "luasnip", group_index = 2 },
},
...
}