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.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
Fixes #5469
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
This commit is contained in:
Iordanis Petkakis 2025-01-28 10:19:01 +02:00 committed by GitHub
parent 83bf6360a1
commit 0350934d56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,7 +30,9 @@ return {
opts = function() opts = function()
LazyVim.cmp.actions.snippet_forward = function() LazyVim.cmp.actions.snippet_forward = function()
if require("luasnip").jumpable(1) then if require("luasnip").jumpable(1) then
vim.schedule(function()
require("luasnip").jump(1) require("luasnip").jump(1)
end)
return true return true
end end
end end