From 8a7e434c101c3d075dcf979e1aafea1a3d65470d Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 11 Apr 2022 19:57:06 +0200 Subject: feat(cmp): add more mappings --- fnl/config/cmp.fnl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'fnl') diff --git a/fnl/config/cmp.fnl b/fnl/config/cmp.fnl index e4e16da..082303c 100644 --- a/fnl/config/cmp.fnl +++ b/fnl/config/cmp.fnl @@ -9,7 +9,15 @@ (cmp.setup {:snippet {:expand (fn [args] (luasnip.lsp_expand args.body))} :mapping {: (cmp.mapping.select_prev_item) - : (cmp.mapping.select_next_item)} + : (cmp.mapping.select_next_item) + : (cmp.mapping (cmp.mapping.scroll_docs -1) + [:i :c]) + : (cmp.mapping (cmp.mapping.scroll_docs 1) [:i :c]) + : (cmp.mapping (cmp.mapping.complete) [:i :c]) + : (cmp.mapping {:i (cmp.mapping.abort) + :c (cmp.mapping.close)}) + : (cmp.mapping.confirm {:select true}) + : (cmp.mapping.confirm {:select true})} :sources [{:name :nvim_lsp} {:name :nvim_lua} {:name :luasnip} @@ -29,4 +37,6 @@ "─" "╰" "│"]} + :confirm_opts {:behavior (cmp.ConfirmBehavior.Replace) + :select false} :experimental {:ghost_text false :native_menu false}})) -- cgit v1.2.3-70-g09d2