tuning of blink

This commit is contained in:
2025-01-05 13:15:15 +01:00
parent 7b81bf1dd1
commit ed7efcc18e
3 changed files with 26 additions and 21 deletions

View File

@ -5,6 +5,7 @@ return {
dependencies = {
'rafamadriz/friendly-snippets',
'giuxtaposition/blink-cmp-copilot',
'folke/lazydev.nvim',
'L3MON4D3/LuaSnip',
{
'saghen/blink.compat',
@ -45,9 +46,17 @@ return {
-- default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, via `opts_extend`
sources = {
default = { 'lsp', 'path', 'luasnip', 'buffer', 'copilot', 'codeium' },
default = { 'copilot', 'lazydev', 'lsp', 'path', 'luasnip', 'buffer', 'codeium' },
-- optionally disable cmdline completions
-- cmdline = {},
cmdline = function()
local type = vim.fn.getcmdtype()
-- Search forward and backward
if type == '/' or type == '?' then return { 'buffer' } end
-- Commands
if type == ':' or type == '@' then return { 'cmdline', 'buffer' } end
return {}
end,
providers = {
copilot = {
name = 'copilot',
@ -55,6 +64,12 @@ return {
score_offset = 100,
async = true,
},
lazydev = {
name = 'LazyDev',
module = 'lazydev.integrations.blink',
-- make lazydev completions top priority (see `:h blink.cmp`)
score_offset = 100,
},
codeium = { -- TODO: Replace with https://github.com/Exafunction/codeium.nvim/pull/264
name = 'codeium', -- IMPORTANT: use the same name as you would for nvim-cmp
module = 'blink.compat.source',