return { 'saghen/blink.cmp', version = '1.*', dependencies = { 'Kaiser-Yang/blink-cmp-git', 'folke/lazydev.nvim', 'bydlw98/blink-cmp-env', { 'bydlw98/blink-cmp-sshconfig', build = 'make' }, }, ---@module 'blink.cmp' ---@type blink.cmp.Config event = { 'InsertEnter', 'LspAttach' }, config = function(_, opts) vim.o.pumheight = 15 opts.completion.menu.max_height = vim.o.pumheight require('config.blink') require('blink.cmp').setup(opts) end, opts = { keymap = { [''] = { 'select_prev' }, [''] = { 'show', 'select_next' }, [''] = {}, [''] = { function(cmp) return cmp.snippet_active() and cmp.accept() or cmp.select_and_accept() end, 'snippet_forward', }, }, completion = { accept = { auto_brackets = { enabled = false }, }, documentation = { auto_show = true, window = { border = 'single', scrollbar = false, }, }, menu = { auto_show = false, border = 'single', scrollbar = false, draw = { treesitter = { 'lsp', 'snippets', 'buffer' }, columns = { { 'label', 'label_description', gap = 1 }, { 'kind' }, }, components = { kind = { ellipsis = false, text = function(ctx) return '[' .. ctx.kind .. ']' end, highlight = function(ctx) return ctx.kind_hl end, }, }, }, }, ghost_text = { enabled = true, show_with_selection = true, show_without_selection = false, show_without_menu = false, }, }, sources = { default = { 'git', 'conventional_commits', 'lsp', 'path', 'buffer', 'env', 'snippets', 'sshconfig', }, providers = { git = { module = 'blink-cmp-git', name = 'Git', }, sshconfig = { name = 'SshConfig', module = 'blink-cmp-sshconfig', }, conventional_commits = { name = 'Conventional Commits', module = 'config.blink.conventional_commits', }, lazydev = { name = 'LazyDev', module = 'lazydev.integrations.blink', score_offset = 100, }, env = { name = 'Env', module = 'blink-cmp-env', }, }, }, }, keys = { { '', mode = 'i' } }, opts_extend = { 'sources.default' }, }