diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua index ddf8d71..fadff96 100644 --- a/lua/plugins/blink.lua +++ b/lua/plugins/blink.lua @@ -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',