From 6f48e2650f156dc240c109cf8ec1cc36b83d10da Mon Sep 17 00:00:00 2001 From: hrsh7th Date: Thu, 9 Sep 2021 22:06:12 +0900 Subject: [PATCH] Update README.md --- README.md | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/README.md b/README.md index 0b0af2e..8a09d89 100644 --- a/README.md +++ b/README.md @@ -483,43 +483,7 @@ This will greatly slow down nvim-cmp (and other LSP related features). #### How to setup supertab-like mapping? -This is a supertab-like mapping for [LuaSnip](https://github.com/L3MON4D3/LuaSnip) - -```lua -local luasnip = require("luasnip") - -local t = function(str) - return vim.api.nvim_replace_termcodes(str, true, true, true) -end - --- supertab-like mapping -mapping = { - [""] = cmp.mapping(function(fallback) - if vim.fn.pumvisible() == 1 then - vim.api.nvim_feedkeys(t(""), "n", true) - elseif luasnip.expand_or_jumpable() then - vim.api.nvim_feedkeys(t("luasnip-expand-or-jump"), "", true) - else - fallback() - end - end, { - "i", - "s", - }), - [""] = cmp.mapping(function(fallback) - if vim.fn.pumvisible() == 1 then - vim.api.nvim_feedkeys(t(""), "n", true) - elseif luasnip.jumpable(-1) then - vim.api.nvim_feedkeys(t("luasnip-jump-prev"), "", true) - else - fallback() - end - end, { - "i", - "s", - }), -} -``` +You can found the solution in [Example mappings](https://github.com/hrsh7th/nvim-cmp/wiki/Example-mappings). #### How to show name of item kind and source (like compe)?