From 7778d05f1034b97f9a31a0d7ded10d14c2d2073f Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Fri, 21 Jul 2023 23:44:22 -0700 Subject: [PATCH] Some extra completion code --- lua/conf/langs/completion.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/conf/langs/completion.lua b/lua/conf/langs/completion.lua index 1d3fb19..c0dbae3 100644 --- a/lua/conf/langs/completion.lua +++ b/lua/conf/langs/completion.lua @@ -45,10 +45,15 @@ cmp.setup({ nvim_lsp = 'λ', vsnip = '⋗', buffer = 'Ω', - path = '🖫', + path = '•', } item.menu = menu_icon[entry.source.name] return item end, }, + -- This will let enter work like expected and tab can be used to pick a suggestion. + preselect = cmp.PreselectMode.None }) + +-- This also prevents enter from selecting the first suggestion. +vim.o.completeopt = "menuone,noselect,preview"