From 0350934d56579f3e6a9d40fa47313b2970d74772 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Tue, 28 Jan 2025 10:19:01 +0200 Subject: [PATCH] fix(luasnip): schedule `jump` to be compatible with blink, nvim-cmp still works after change (#5470) ## Description Schedule `jump` in Luasnip `snippet_forward`, so that it doesn't get stuck before the last placeholder. ## Related Issue(s) Fixes #5469 ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 8b3daed7..85ed2fd5 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -30,7 +30,9 @@ return { opts = function() LazyVim.cmp.actions.snippet_forward = function() if require("luasnip").jumpable(1) then - require("luasnip").jump(1) + vim.schedule(function() + require("luasnip").jump(1) + end) return true end end