fix(copilot): removed special handling of copilot in cmp. no longer needed

This commit is contained in:
Folke Lemaitre
2023-05-12 17:01:10 +02:00
parent 7d96b07c6f
commit 049e323714

View File

@ -66,21 +66,6 @@ return {
table.insert(opts.sources, 1, { name = "copilot", group_index = 2 })
local confirm = opts.mapping["<CR>"]
local confirm_copilot = cmp.mapping.confirm({
select = true,
behavior = cmp.ConfirmBehavior.Replace,
})
opts.mapping = vim.tbl_extend("force", opts.mapping, {
["<CR>"] = function(...)
local entry = cmp.get_selected_entry()
if entry and entry.source.name == "copilot" then
return confirm_copilot(...)
end
return confirm(...)
end,
})
opts.sorting = {
priority_weight = 2,
comparators = {