diff --git a/plugins/completion/nvim-cmp/default.nix b/plugins/completion/nvim-cmp/default.nix index 9575b949..d2e58643 100644 --- a/plugins/completion/nvim-cmp/default.nix +++ b/plugins/completion/nvim-cmp/default.nix @@ -82,25 +82,19 @@ in { ) ); example = { - "" = "cmp.mapping.confirm({ select = true })"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.close()"; "" = { modes = ["i" "s"]; - action = '' - function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expandable() then - luasnip.expand() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - elseif check_backspace() then - fallback() - else - fallback() - end - end - ''; + action = "cmp.mapping.select_next_item()"; }; + "" = { + modes = ["i" "s"]; + action = "cmp.mapping.select_prev_item()"; + }; + "" = "cmp.mapping.confirm({ select = true })"; }; };