mirror of
https://github.com/NvChad/NvChad.git
synced 2024-11-10 07:10:44 +00:00
chore: prefer luasnip api methods over vim.fn.feedkeys in cmp's spec (#2930)
This commit is contained in:
parent
231ec0ba72
commit
b657b0ef84
@ -85,7 +85,7 @@ local options = {
|
|||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
elseif require("luasnip").expand_or_jumpable() then
|
elseif require("luasnip").expand_or_jumpable() then
|
||||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "")
|
require("luasnip").expand_or_jump()
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
@ -95,7 +95,7 @@ local options = {
|
|||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item()
|
cmp.select_prev_item()
|
||||||
elseif require("luasnip").jumpable(-1) then
|
elseif require("luasnip").jumpable(-1) then
|
||||||
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "")
|
require("luasnip").jump(-1)
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user