fix(copliot): restructure copilot-cmp spec

This commit is contained in:
Folke Lemaitre 2024-12-12 13:32:56 +01:00
parent bdc865b291
commit 34d2bdcac6

View file

@ -58,6 +58,8 @@ return {
end,
},
vim.g.ai_cmp
and {
-- copilot cmp source
{
"nvim-cmp",
@ -65,7 +67,6 @@ return {
dependencies = { -- this will only be evaluated if nvim-cmp is enabled
{
"zbirenbaum/copilot-cmp",
enabled = vim.g.ai_cmp, -- only enable if wanted
opts = {},
config = function(_, opts)
local copilot_cmp = require("copilot_cmp")
@ -93,8 +94,7 @@ return {
},
},
},
vim.g.ai_cmp and {
{
"saghen/blink.cmp",
optional = true,
dependencies = { "giuxtaposition/blink-cmp-copilot" },
@ -110,5 +110,7 @@ return {
},
},
},
} or nil,
},
}
or nil,
}