You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an inconvenience with the mechanics of snippet completion. I usually use snippets for writing LaTeX code which involves using multiple snippets at the same time. For example first expand a fraction \frac{$1}{$2}$0, then at $1 expand sum \displaystyle\sum_{$1}^{$2}($3)$0. This produces this code (█ indicating position of the cursor): \frac{\displaystyle\sum_{█}^{}()}{}. At this point everything is as expected.
I use <Tab> to navigate the snippet. The problem is that the second expanded completion is completely ignored and I am not able to jump through it. It only follows the first used completion until it is complete. So in the above example when I press <Tab> it would result in the following state (█ is cursor): \frac{\displaystyle\sum_{}^{}()}{█} instead of \frac{\displaystyle\sum_{}^{█}()}{}.
This behavior defeats the point of using snippets for me. If I am not mistaking this behavior is actually caused by neovim? It is specified in https://cmp.saghen.dev/configuration/snippets.html#snippets that "Blink uses the vim.snippet API by default for expanding and navigating snippets.", so it might be more appropriate to create an issue in neovim repository?
I would expect the completion engine to instead nest all the completions and keep track of all the future positions that should be respected. Maybe its possible to implement a solution inside the blink.cmp?
I use LazyVim in my setup if it is necessary to know.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey!
I am encountering an inconvenience with the mechanics of snippet completion. I usually use snippets for writing LaTeX code which involves using multiple snippets at the same time. For example first expand a fraction
\frac{$1}{$2}$0
, then at$1
expand sum\displaystyle\sum_{$1}^{$2}($3)$0
. This produces this code (█
indicating position of the cursor):\frac{\displaystyle\sum_{█}^{}()}{}
. At this point everything is as expected.I use
<Tab>
to navigate the snippet. The problem is that the second expanded completion is completely ignored and I am not able to jump through it. It only follows the first used completion until it is complete. So in the above example when I press<Tab>
it would result in the following state (█
is cursor):\frac{\displaystyle\sum_{}^{}()}{█}
instead of\frac{\displaystyle\sum_{}^{█}()}{}
.This behavior defeats the point of using snippets for me. If I am not mistaking this behavior is actually caused by neovim? It is specified in https://cmp.saghen.dev/configuration/snippets.html#snippets that "Blink uses the
vim.snippet
API by default for expanding and navigating snippets.", so it might be more appropriate to create an issue in neovim repository?I would expect the completion engine to instead nest all the completions and keep track of all the future positions that should be respected. Maybe its possible to implement a solution inside the blink.cmp?
I use LazyVim in my setup if it is necessary to know.
Thanks for such a wonderful plugin btw :D
Beta Was this translation helpful? Give feedback.
All reactions