From aebef6589d5fb1211e670b580c57e4225b90a4bd Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 16 Sep 2021 22:50:19 +0200 Subject: [PATCH] Don't use tab for autocomplete selection --- lua/cmp_plug.lua | 8 ++------ lua/keymappings.lua | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lua/cmp_plug.lua b/lua/cmp_plug.lua index 502ab1f..0ff0dbf 100644 --- a/lua/cmp_plug.lua +++ b/lua/cmp_plug.lua @@ -45,9 +45,7 @@ cmp.setup { select = true }), [""] = cmp.mapping(function(fallback) - if vim.fn.pumvisible() == 1 then - vim.api.nvim_feedkeys(t(""), "n", true) - elseif luasnip.expand_or_jumpable() then + if luasnip.expand_or_jumpable() then vim.api.nvim_feedkeys(t("luasnip-expand-or-jump"), "", true) else fallback() @@ -57,9 +55,7 @@ cmp.setup { "s", }), [""] = cmp.mapping(function(fallback) - if vim.fn.pumvisible() == 1 then - vim.api.nvim_feedkeys(t(""), "n", true) - elseif luasnip.jumpable(-1) then + if luasnip.jumpable(-1) then vim.api.nvim_feedkeys(t("luasnip-jump-prev"), "", true) else fallback() diff --git a/lua/keymappings.lua b/lua/keymappings.lua index 65718f9..b86098a 100644 --- a/lua/keymappings.lua +++ b/lua/keymappings.lua @@ -55,8 +55,6 @@ utils.map('v', '<', '', '>gv') -- Highlight word under cursor -utils.map('n', 'ü', ":let @/='\\<=expand(\"\")\\>':set hls", { noremap = true, silent = true }) -utils.map('v', 'ü', "y:let @/='=escape(@\",'/\\')':set hls", { noremap = true, silent = true }) -- Close Buffer utils.map('n', '', ':bd')