style: format

This commit is contained in:
Folke Lemaitre 2026-03-16 19:07:44 +01:00
parent 954d8746e5
commit 6055e59613
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -70,60 +70,58 @@ return {
end, end,
}, },
vim.g.ai_cmp vim.g.ai_cmp and {
and { -- copilot cmp source
-- copilot cmp source {
"hrsh7th/nvim-cmp",
optional = true,
dependencies = { -- this will only be evaluated if nvim-cmp is enabled
{ {
"hrsh7th/nvim-cmp", "zbirenbaum/copilot-cmp",
optional = true, opts = {},
dependencies = { -- this will only be evaluated if nvim-cmp is enabled 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
Snacks.util.lsp.on({ name = "copilot" }, function()
copilot_cmp._on_insert_enter({})
end)
end,
specs = {
{ {
"zbirenbaum/copilot-cmp", "hrsh7th/nvim-cmp",
opts = {}, optional = true,
config = function(_, opts) ---@param opts cmp.ConfigSchema
local copilot_cmp = require("copilot_cmp") opts = function(_, opts)
copilot_cmp.setup(opts) table.insert(opts.sources, 1, {
-- attach cmp source whenever copilot attaches
-- fixes lazy-loading issues with the copilot cmp source
Snacks.util.lsp.on({ name = "copilot" }, function()
copilot_cmp._on_insert_enter({})
end)
end,
specs = {
{
"hrsh7th/nvim-cmp",
optional = true,
---@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, 1, {
name = "copilot",
group_index = 1,
priority = 100,
})
end,
},
},
},
},
},
{
"saghen/blink.cmp",
optional = true,
dependencies = { "fang2hou/blink-copilot" },
opts = {
sources = {
default = { "copilot" },
providers = {
copilot = {
name = "copilot", name = "copilot",
module = "blink-copilot", group_index = 1,
score_offset = 100, priority = 100,
async = true, })
}, end,
},
}, },
}, },
}, },
} },
or nil, },
{
"saghen/blink.cmp",
optional = true,
dependencies = { "fang2hou/blink-copilot" },
opts = {
sources = {
default = { "copilot" },
providers = {
copilot = {
name = "copilot",
module = "blink-copilot",
score_offset = 100,
async = true,
},
},
},
},
},
} or nil,
} }