-- The completion menu: language server, paths and words of the open buffers. -- -- It shares insert mode with LLeMbas's suggestions (the grey text ahead of the cursor), and the -- two never want the same key: -- accepts LLeMbas's suggestion ( one word of it). Never the menu. -- or move in the menu; nothing in it is chosen until you do. -- takes the menu entry you moved to; with none chosen it is a plain Enter. -- takes the first entry without moving. -- closes the menu. opens it, or shows the entry's documentation. local M = {} function M.setup() require("blink.cmp").setup({ keymap = { preset = "none", [""] = { "show", "show_documentation", "hide_documentation" }, [""] = { "hide", "fallback" }, [""] = { "select_and_accept", "fallback" }, [""] = { "accept", "fallback" }, [""] = { "select_next", "fallback_to_mappings" }, [""] = { "select_prev", "fallback_to_mappings" }, [""] = { "select_next", "fallback" }, [""] = { "select_prev", "fallback" }, [""] = { "scroll_documentation_down", "fallback" }, [""] = { "scroll_documentation_up", "fallback" }, }, completion = { list = { selection = { preselect = false, auto_insert = false } }, ghost_text = { enabled = false }, -- the grey text is LLeMbas's documentation = { auto_show = true, auto_show_delay_ms = 400, window = { border = "rounded" } }, menu = { border = "rounded", draw = { columns = { { "label", "label_description", gap = 1 }, { "kind" } } }, -- kinds in words: no icon font needed }, }, sources = { default = { "lsp", "path", "buffer" } }, cmdline = { enabled = false }, -- the command line keeps Neovim's own completion -- The matcher written in Lua: the compiled one would be a binary downloaded at run time. fuzzy = { implementation = "lua", prebuilt_binaries = { download = false } }, }) end return M