---@module 'lazy' ---@type LazySpec return { { 'saghen/blink.cmp', event = 'InsertEnter', version = '*', build = 'cargo build --release', dependencies = { 'saghen/blink.compat', }, ---@module 'blink.cmp' ---@type blink.cmp.Config opts = { keymap = { preset = 'none', [''] = { 'accept', 'fallback' }, -- accept the snippet [''] = { 'show', 'show_documentation', 'hide_documentation' }, -- toggle auto-cmp manually [''] = { 'show_signature', 'hide_signature', 'fallback' }, -- toggle signature [''] = { 'select_next', 'fallback' }, -- next item [''] = { 'select_prev', 'fallback' }, -- previous item [''] = { 'scroll_documentation_down', 'fallback' }, -- forwards into the docs [''] = { 'scroll_documentation_up', 'fallback' }, -- backwards into the docs [''] = { 'cancel', 'fallback' }, -- keybind for cancelling completion }, snippets = { preset = 'luasnip' }, sources = { default = { 'lsp', 'path', 'snippets' }, }, completion = { menu = { auto_show = true, -- whether to automatically show the window when new completion items are available border = 'rounded', draw = { columns = { { "kind_icon" }, { "label", "label_description", gap = 1 }, { 'kind' } }, treesitter = { 'lsp', 'snippets' }, }, }, documentation = { auto_show = true, -- whether documentation is automatically shown when selecting a completion item auto_show_delay_ms = 250, treesitter_highlighting = true, window = { border = "rounded" }, }, list = { selection = { preselect = true, auto_insert = true } }, trigger = { show_on_insert_on_trigger_character = true, show_on_accept_on_trigger_character = true, show_in_snippet = false, }, ghost_text = { enabled = true, show_with_selection = false, -- whether the ghost text is shown when an item is selected show_without_selection = true, -- whether the ghost text is shown when no item is selected show_with_menu = true, -- show ghost text when the menu is open show_without_menu = true, -- show ghost text when the menu is closed } }, fuzzy = { use_proximity = true, frecency = { enabled = true, }, prebuilt_binaries = { download = false, -- we are building from source } } }, config = function(_, opts) require("blink.cmp").setup(opts) end } }