Copilot
To use this, add it to your lazy.nvim imports:
lua/config/lazy.lua
require("lazy").setup({
spec = {
{ "folke/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.coding.copilot" },
{ import = "plugins" },
},
})
copilot.lua
copilot
- Options
- Full Spec
opts = {
suggestion = { enabled = false },
panel = { enabled = false },
}
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
build = ":Copilot auth",
opts = {
suggestion = { enabled = false },
panel = { enabled = false },
},
}
copilot-cmp
- Options
- Full Spec
opts = {}
{
"zbirenbaum/copilot-cmp",
dependencies = "copilot.lua",
opts = {},
config = function(_, opts)
local copilot_cmp = require("copilot_cmp")
copilot_cmp.setup(opts)
-- attach cmp source whenever copilot attaches
-- fixes lazy-loading issues with the copilot cmp source
require("lazyvim.util").on_attach(function(client)
if client.name == "copilot" then
copilot_cmp._on_insert_enter()
end
end)
end,
}