mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-21 20:11:06 +00:00
style: format
This commit is contained in:
parent
954d8746e5
commit
6055e59613
1 changed files with 48 additions and 50 deletions
|
|
@ -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,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue