You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kickstart.nvim/lua/custom/plugins/copilot.lua

32 lines
716 B
Lua

return {
{
'zbirenbaum/copilot.lua',
cmd = 'Copilot',
event = 'InsertEnter',
build = ':Copilot auth',
opts = {
filetypes = {
markdown = true,
help = true,
},
},
},
{
'zbirenbaum/copilot-cmp',
dependencies = 'copilot.lua',
opts = {},
config = function(_, opts)
local copilot_cmp = require 'copilot_cmp'
copilot_cmp.setup(opts)
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client and client.name == 'copilot' then
copilot_cmp._on_insert_enter {}
end
end,
})
end,
},
}