refactor: streamline blink compatibility integration
This commit is contained in:
+14
-14
@@ -32,10 +32,6 @@ if vim.g.useblinkcmp then
|
|||||||
{ -- Blink completion
|
{ -- Blink completion
|
||||||
import = 'lazyvim.plugins.extras.coding.blink',
|
import = 'lazyvim.plugins.extras.coding.blink',
|
||||||
},
|
},
|
||||||
{ -- Blink compat
|
|
||||||
'saghen/blink.compat',
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
'saghen/blink.cmp',
|
'saghen/blink.cmp',
|
||||||
opts = {
|
opts = {
|
||||||
@@ -45,16 +41,7 @@ if vim.g.useblinkcmp then
|
|||||||
['<C-e>'] = { 'hide', 'fallback' },
|
['<C-e>'] = { 'hide', 'fallback' },
|
||||||
|
|
||||||
['<Tab>'] = {
|
['<Tab>'] = {
|
||||||
function(cmp)
|
LazyVim.cmp.map({ 'snippet_forward', 'ai_accept' }),
|
||||||
if cmp.is_in_snippet() then
|
|
||||||
-- If the completion is in a snippet, accept it
|
|
||||||
return cmp.accept()
|
|
||||||
else
|
|
||||||
-- If the completion is not in a snippet, select the next one
|
|
||||||
return cmp.select_next()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
'snippet_forward',
|
|
||||||
'fallback',
|
'fallback',
|
||||||
},
|
},
|
||||||
['<S-Tab>'] = { 'snippet_backward', 'fallback' },
|
['<S-Tab>'] = { 'snippet_backward', 'fallback' },
|
||||||
@@ -72,6 +59,19 @@ if vim.g.useblinkcmp then
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{ -- Blink compat
|
||||||
|
'saghen/blink.compat',
|
||||||
|
optional = true, -- make optional so it's only enabled if any extras need it
|
||||||
|
opts = {},
|
||||||
|
version = not vim.g.lazyvim_blink_main and '*',
|
||||||
|
},
|
||||||
|
{ -- Catppuccin integration
|
||||||
|
'catppuccin',
|
||||||
|
optional = true,
|
||||||
|
opts = {
|
||||||
|
integrations = { blink_cmp = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user