From 3a0838448bc840b1d48f8009f6180c6eee7de56e Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Tue, 27 Feb 2024 02:42:26 +0800 Subject: [PATCH] nvim-cmp: add keybind for arrow keys --- lua/plugins/completion.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/completion.lua b/lua/plugins/completion.lua index 3158a2f..43bec86 100644 --- a/lua/plugins/completion.lua +++ b/lua/plugins/completion.lua @@ -52,7 +52,9 @@ return { end end, { "i", "s" }), - [''] = cmp.mapping.confirm(), + [""] = cmp.mapping.confirm(), + [""] = cmp.mapping.select_prev_item({ behavior = "select" }), + [""] = cmp.mapping.select_next_item({ behavior = "select" }), }, -- snippet engine