mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-26 18:59:00 +02:00
fix(copilot): removed special handling of copilot in cmp. no longer needed
This commit is contained in:
parent
7d96b07c6f
commit
049e323714
1 changed files with 0 additions and 15 deletions
|
@ -66,21 +66,6 @@ return {
|
||||||
|
|
||||||
table.insert(opts.sources, 1, { name = "copilot", group_index = 2 })
|
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 = {
|
opts.sorting = {
|
||||||
priority_weight = 2,
|
priority_weight = 2,
|
||||||
comparators = {
|
comparators = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue