return {
|
|
'saghen/blink.cmp',
|
|
lazy = false,
|
|
dependencies = {
|
|
{ 'rafamadriz/friendly-snippets' },
|
|
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true },
|
|
{ 'saghen/blink.compat', version = '2.*', lazy = true, opts = {} },
|
|
},
|
|
|
|
version = '1.*',
|
|
opts = {
|
|
completion = {
|
|
menu = {
|
|
auto_show = true,
|
|
winblend = vim.o.pumblend,
|
|
scrollbar = true,
|
|
border = 'single',
|
|
draw = {
|
|
columns = {
|
|
{ "label", "label_description", gap = 1 },
|
|
{ "kind_icon", "kind", gap = 1 }
|
|
},
|
|
components = {
|
|
kind_icon = {
|
|
ellipsis = false,
|
|
text = function(ctx)
|
|
return ctx.kind_icon .. ctx.icon_gap
|
|
end,
|
|
highlight = function(ctx)
|
|
return 'BlinkCmpKind' .. ctx.kind
|
|
end,
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
documentation = {
|
|
auto_show = true,
|
|
auto_show_delay_ms = 200, -- Faster doc display
|
|
window = {
|
|
border = 'single',
|
|
winblend = vim.o.pumblend,
|
|
max_width = 80,
|
|
max_height = 20,
|
|
}
|
|
},
|
|
|
|
ghost_text = { enabled = false },
|
|
},
|
|
|
|
appearance = {
|
|
use_nvim_cmp_as_default = true,
|
|
nerd_font_variant = 'mono'
|
|
},
|
|
|
|
sources = {
|
|
default = {
|
|
'lsp',
|
|
'path',
|
|
'snippets',
|
|
'buffer',
|
|
'dadbod',
|
|
'laravel',
|
|
},
|
|
|
|
providers = {
|
|
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
|
|
laravel = {
|
|
name = "laravel",
|
|
module = "blink.compat.source",
|
|
},
|
|
},
|
|
},
|
|
|
|
signature = {
|
|
enabled = true,
|
|
window = {
|
|
border = 'single',
|
|
winblend = vim.o.pumblend,
|
|
},
|
|
},
|
|
},
|
|
opts_extend = { "sources.default" },
|
|
config = function(_, opts)
|
|
require('blink.cmp').setup(opts)
|
|
|
|
-- Optional: Set up highlights
|
|
vim.api.nvim_set_hl(0, 'BlinkCmpMenu', { link = 'Pmenu' })
|
|
vim.api.nvim_set_hl(0, 'BlinkCmpMenuBorder', { link = 'Pmenu' })
|
|
vim.api.nvim_set_hl(0, 'BlinkCmpMenuSelection', { link = 'PmenuSel' })
|
|
vim.api.nvim_set_hl(0, 'BlinkCmpDoc', { link = 'NormalFloat' })
|
|
vim.api.nvim_set_hl(0, 'BlinkCmpDocBorder', { link = 'FloatBorder' })
|
|
vim.api.nvim_set_hl(0, 'BlinkCmpSignatureHelp', { link = 'NormalFloat' })
|
|
vim.api.nvim_set_hl(0, 'BlinkCmpSignatureHelpBorder', { link = 'FloatBorder' })
|
|
end
|
|
}
|