From b657b0ef84a6aa9a86ac05341d1bc1ab5f037ee7 Mon Sep 17 00:00:00 2001 From: gale <106234166+mgastonportillo@users.noreply.github.com> Date: Tue, 16 Jul 2024 02:24:36 -0300 Subject: [PATCH] chore: prefer luasnip api methods over vim.fn.feedkeys in cmp's spec (#2930) --- lua/nvchad/configs/cmp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/nvchad/configs/cmp.lua b/lua/nvchad/configs/cmp.lua index 46f8864..3eb7697 100644 --- a/lua/nvchad/configs/cmp.lua +++ b/lua/nvchad/configs/cmp.lua @@ -85,7 +85,7 @@ local options = { if cmp.visible() then cmp.select_next_item() elseif require("luasnip").expand_or_jumpable() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") + require("luasnip").expand_or_jump() else fallback() end @@ -95,7 +95,7 @@ local options = { if cmp.visible() then cmp.select_prev_item() elseif require("luasnip").jumpable(-1) then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") + require("luasnip").jump(-1) else fallback() end