diff options
author | Adam <56338480+adastx@users.noreply.github.com> | 2021-10-09 09:49:48 +0200 |
---|---|---|
committer | Adam <56338480+adastx@users.noreply.github.com> | 2021-10-09 09:49:48 +0200 |
commit | e7c9fe1e97f3b6f62ecb03b5fa7908b044730335 (patch) | |
tree | d8988b74e42b2038edef2714ef776865a98819f0 | |
parent | 7df52095b08341146f7eee633363faa74a639b13 (diff) |
vim improved snippet binds
-rw-r--r-- | .config/nvim/lua/opts.lua | 8 |
1 files changed, 1 insertions, 7 deletions
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, }, ["<Tab>"] = cmp.mapping(function(fallback) - if vim.fn.complete_info()["selected"] == -1 and vim.fn["UltiSnips#CanExpandSnippet"]() == 1 then - vim.fn.feedkeys(t("<C-R>=UltiSnips#ExpandSnippet()<CR>")) - elseif vim.fn["UltiSnips#CanJumpForwards"]() == 1 then + if vim.fn["UltiSnips#CanJumpForwards"]() == 1 then vim.fn.feedkeys(t("<ESC>:call UltiSnips#JumpForwards()<CR>")) - elseif vim.fn.pumvisible() == 1 then - vim.fn.feedkeys(t("<C-n>"), "n") else fallback() end @@ -53,8 +49,6 @@ cmp.setup { ["<S-Tab>"] = cmp.mapping(function(fallback) if vim.fn["UltiSnips#CanJumpBackwards"]() == 1 then return vim.fn.feedkeys(t("<ESC>:call UltiSnips#JumpBackwards()<CR>")) - elseif vim.fn.pumvisible() == 1 then - vim.fn.feedkeys(t("<C-p>"), "n") else fallback() end |