local M = { { "saghen/blink.cmp", version = "*", event = { "InsertEnter", "CmdlineEnter" }, opts = { keymap = { preset = "default", [""] = { function(ctx) if ctx.is_ghost_text_visible() and not ctx.is_menu_visible() then return ctx.accept() end end, "select_next", "snippet_forward", "fallback", }, [""] = { "show_and_insert", "select_prev" }, [""] = { "accept", "fallback", }, }, appearance = { nerd_font_variant = "mono", }, completion = { documentation = { auto_show = true }, ghost_text = { enabled = true }, list = { selection = { preselect = false, auto_insert = true } }, }, sources = { default = { "lsp", "buffer", "path" }, }, fuzzy = { implementation = "prefer_rust_with_warning" }, cmdline = { enabled = true, keymap = { preset = "cmdline", }, sources = function() local type = vim.fn.getcmdtype() if type == "/" or type == "?" then return { "buffer" } end if type == ":" or type == "@" then return { "cmdline" } end return {} end, completion = { menu = { auto_show = true }, ghost_text = { enabled = true }, list = { selection = { preselect = true, auto_insert = true } }, }, }, }, }, } return M