diff --git a/config/plugins/cmp/cmp.nix b/config/plugins/cmp/cmp.nix index f8f42d3..1592ed4 100644 --- a/config/plugins/cmp/cmp.nix +++ b/config/plugins/cmp/cmp.nix @@ -11,17 +11,36 @@ {name = "path";} # Filesystem paths ]; # The snippet expansion function. - snippet.expand = '' - function(args) - require('luasnip').lsp_expand(args.body) - end - ''; + snippet.expand = + #Lua + '' + function(args) + require('luasnip').lsp_expand(args.body) + end + ''; # cmp mappings declaration mapping = { - "" = "cmp.mapping.select_next_item()"; - "" = "cmp.mapping.select_prev_item()"; - "" = "cmp.mapping.abort()"; - "" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })"; + "" = + # Lua + "cmp.mapping.scroll_docs(-4)"; + "" = + # Lua + "cmp.mapping.scroll_docs(4)"; + "" = + # Lua + "cmp.mapping.complete()"; + "" = + # Lua + "cmp.mapping.close()"; + "" = + # Lua + "cmp.mapping(cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select}), {'i', 's'})"; + "" = + # Lua + "cmp.mapping(cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select}), {'i', 's'})"; + "" = + # Lua + "cmp.mapping.confirm({ select = false, behavior = cmp.ConfirmBehavior.Replace })"; }; }; # Scans the sources array and enable the corresponding plugins if they are known to nixvim.