Accepting without breaking the current snippet
Closed this issue · 2 comments
Make sure you have done the following
- I have updated to the latest version of
blink.cmp
- I have read the README
Bug Description
Unfortenatly, It seems that I cannot reopen my previous issue #624 so I'm creating a new one.
First, Thanks for your fast response with the previous one. I think I didn't provide a good enough example, and weren't probably clear with my explanations, So the suggested fix is not what exactly I wanted. So let me try again.
It seems that your fix works as long as the first parameter is just a simple string. Consider the following code:
Now if I hit tab, I expect the first parameter of the snippet to be set to the variable format
defined above, while still being able to jump to the next parameter. The behaviour I want can be expressed in the following keymap:
["<Tab>"] = {
function(cmp)
if cmp.snippet_active() then
cmp.accept()
return cmp.snippet_forward()
end
return cmp.select_and_accept()
end,
"fallback",
}
With your fix, this works as long as the first parameter is a string, not a variable or any other type of suggestion.
Relevant configuration
No response
neovim version
NVIM v0.10.2
blink.cmp
version: branch, tag, or commit
main
Just reopened it, we can continue using the old issue