fix: new function to check for cmp completitions
This commit is contained in:
parent
5799af49e2
commit
40554c80ad
@ -43,7 +43,7 @@ cmp.setup {
|
||||
select = true,
|
||||
},
|
||||
["<Tab>"] = function(fallback)
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
if cmp.visible() then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<C-n>", true, true, true), "n")
|
||||
elseif require("luasnip").expand_or_jumpable() then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "")
|
||||
@ -52,7 +52,7 @@ cmp.setup {
|
||||
end
|
||||
end,
|
||||
["<S-Tab>"] = function(fallback)
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
if cmp.visible() then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<C-p>", true, true, true), "n")
|
||||
elseif require("luasnip").jumpable(-1) then
|
||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "")
|
||||
|
Loading…
Reference in New Issue
Block a user