From ce6333411c6d6875d5694e548735daac92a6a7db Mon Sep 17 00:00:00 2001 From: Jan Steinke Date: Mon, 22 Apr 2024 19:11:42 +0200 Subject: [PATCH] don't autoselect first item --- nvim/lua/plugins/completion.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/lua/plugins/completion.lua b/nvim/lua/plugins/completion.lua index c073a19e..4e7f9d9b 100644 --- a/nvim/lua/plugins/completion.lua +++ b/nvim/lua/plugins/completion.lua @@ -24,7 +24,7 @@ return { local has_words_before = function() local line, col = unpack(vim.api.nvim_win_get_cursor(0)) return col ~= 0 - and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil + and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil end -- end @@ -45,7 +45,7 @@ return { }), mapping = { -- confirm selection - [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping.confirm(), -- jump between snippet fields -- based on nvim-cmp wiki