new copilot completion

This commit is contained in:
Oliver Hartmann 2025-02-17 10:23:33 +00:00
parent 59ae868284
commit 36afa8eb81

View File

@ -5,6 +5,14 @@ return {
dependencies = {
'rafamadriz/friendly-snippets',
'giuxtaposition/blink-cmp-copilot',
{
'fang2hou/blink-copilot',
opts = {
max_completions = 1, -- Global default for max completions
max_attempts = 2, -- Global default for max attempts
-- `kind` is not set, so the default value is "Copilot"
}
},
'folke/lazydev.nvim',
'L3MON4D3/LuaSnip',
{
@ -84,18 +92,14 @@ return {
providers = {
copilot = {
name = 'copilot',
module = 'blink-cmp-copilot',
module = 'blink-copilot',
score_offset = 100,
async = true,
transform_items = function(_, items)
local CompletionItemKind = require('blink.cmp.types').CompletionItemKind
local kind_idx = #CompletionItemKind + 1
CompletionItemKind[kind_idx] = 'Copilot'
for _, item in ipairs(items) do
item.kind = kind_idx
end
return items
end,
opts = {
-- Local options override global ones
-- Final settings: max_completions = 3, max_attempts = 2, kind = "Copilot"
max_completions = 3, -- Override global max_completions
}
},
lazydev = {
name = 'LazyDev',