From e7c9fe1e97f3b6f62ecb03b5fa7908b044730335 Mon Sep 17 00:00:00 2001 From: Adam <56338480+adastx@users.noreply.github.com> Date: Sat, 9 Oct 2021 09:49:48 +0200 Subject: vim improved snippet binds --- .config/nvim/lua/opts.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to '.config/nvim/lua') diff --git a/.config/nvim/lua/opts.lua b/.config/nvim/lua/opts.lua index ecae0af..bf18e93 100644 --- a/.config/nvim/lua/opts.lua +++ b/.config/nvim/lua/opts.lua @@ -40,12 +40,8 @@ cmp.setup { select = true, }, [""] = cmp.mapping(function(fallback) - if vim.fn.complete_info()["selected"] == -1 and vim.fn["UltiSnips#CanExpandSnippet"]() == 1 then - vim.fn.feedkeys(t("=UltiSnips#ExpandSnippet()")) - elseif vim.fn["UltiSnips#CanJumpForwards"]() == 1 then + if vim.fn["UltiSnips#CanJumpForwards"]() == 1 then vim.fn.feedkeys(t(":call UltiSnips#JumpForwards()")) - elseif vim.fn.pumvisible() == 1 then - vim.fn.feedkeys(t(""), "n") else fallback() end @@ -53,8 +49,6 @@ cmp.setup { [""] = cmp.mapping(function(fallback) if vim.fn["UltiSnips#CanJumpBackwards"]() == 1 then return vim.fn.feedkeys(t(":call UltiSnips#JumpBackwards()")) - elseif vim.fn.pumvisible() == 1 then - vim.fn.feedkeys(t(""), "n") else fallback() end -- cgit v1.2.3-70-g09d2