From 025fbf87a7565a8866aa32a8f2c1049641da1c2f Mon Sep 17 00:00:00 2001 From: jasmine Date: Sun, 22 Dec 2024 10:26:25 +0800 Subject: [PATCH] update mappings --- config/plugins/cmp/cmp.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/config/plugins/cmp/cmp.nix b/config/plugins/cmp/cmp.nix index e21ec5e..bbdebd7 100644 --- a/config/plugins/cmp/cmp.nix +++ b/config/plugins/cmp/cmp.nix @@ -18,16 +18,15 @@ ''; # cmp mappings declaration mapping = { - # Select next/previous item. - "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; - "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; - # Scroll through documentation. - "" = "cmp.mapping.scroll_docs(-4)"; - "" = "cmp.mapping.scroll_docs(4)"; - # Confirm selection. - "" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })"; - # Exit completion. - "" = "cmp.mapping.abort()"; + "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + "" = "cmp.mapping.select_next_item()"; + "" = "cmp.mapping.select_prev_item()"; + "" = "cmp.mapping.abort()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })"; }; }; # Scans the sources array and enable the corresponding plugins if they are known to nixvim.