new copilot completion
This commit is contained in:
parent
59ae868284
commit
36afa8eb81
@ -5,6 +5,14 @@ return {
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
'rafamadriz/friendly-snippets',
|
'rafamadriz/friendly-snippets',
|
||||||
'giuxtaposition/blink-cmp-copilot',
|
'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',
|
'folke/lazydev.nvim',
|
||||||
'L3MON4D3/LuaSnip',
|
'L3MON4D3/LuaSnip',
|
||||||
{
|
{
|
||||||
@ -84,18 +92,14 @@ return {
|
|||||||
providers = {
|
providers = {
|
||||||
copilot = {
|
copilot = {
|
||||||
name = 'copilot',
|
name = 'copilot',
|
||||||
module = 'blink-cmp-copilot',
|
module = 'blink-copilot',
|
||||||
score_offset = 100,
|
score_offset = 100,
|
||||||
async = true,
|
async = true,
|
||||||
transform_items = function(_, items)
|
opts = {
|
||||||
local CompletionItemKind = require('blink.cmp.types').CompletionItemKind
|
-- Local options override global ones
|
||||||
local kind_idx = #CompletionItemKind + 1
|
-- Final settings: max_completions = 3, max_attempts = 2, kind = "Copilot"
|
||||||
CompletionItemKind[kind_idx] = 'Copilot'
|
max_completions = 3, -- Override global max_completions
|
||||||
for _, item in ipairs(items) do
|
}
|
||||||
item.kind = kind_idx
|
|
||||||
end
|
|
||||||
return items
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
lazydev = {
|
lazydev = {
|
||||||
name = 'LazyDev',
|
name = 'LazyDev',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user