diff --git a/config/plugins/cmp/cmp.nix b/config/plugins/cmp/cmp.nix index a52d20c..e21ec5e 100644 --- a/config/plugins/cmp/cmp.nix +++ b/config/plugins/cmp/cmp.nix @@ -8,6 +8,7 @@ sources = [ {name = "nvim_lsp";} # LSP source for cmp {name = "luasnip";} # Snippets source for cmp + {name = "path";} # Filesystem paths ]; # The snippet expansion function. snippet.expand = '' @@ -18,15 +19,15 @@ # cmp mappings declaration mapping = { # Select next/previous item. - "" = "cmp.mapping.select_next_item()"; - "" = "cmp.mapping.select_prev_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 })"; + "" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })"; # Exit completion. - "" = "cmp.mapping.abort()"; + "" = "cmp.mapping.abort()"; }; }; # Scans the sources array and enable the corresponding plugins if they are known to nixvim.