Open medwatt opened 2 years ago
Thanks for the report, could you share the definition for the frac
snippet? If you are already at the last tabstop when pressing Tab
, I don't think that this can be fixed since it then calls fallback()
which is handled by nvim-cmp.
Thanks for the report, could you share the definition for the
frac
snippet? If you are already at the last tabstop when pressingTab
, I don't think that this can be fixed since it then callsfallback()
which is handled by nvim-cmp.
context "math()"
snippet // "Fraction" iA
\\frac{$1}{$2}$0
endsnippet
@medwatt how did you manage to get the snippet to auto-expand with context "math()"
? Adding the context is preventing me from expanding the snippet.
@jasonkena Until now, custom context snippets were not handled correctly. Now that I had time to add proper support for them, could you quickly test this feature? That would be awesome, I want to be sure I didn't break things! :) They should now only be shown when the custom context function returns True
. Here is the PR: #72 (you can use my fork https://github.com/smjonas/cmp-nvim-ultisnips on the custom_context_snippets
branch.
@smjonas unfortunately, it does not seem to work. On the main branch, I can at least see the snippet in the menu (still being unable to expand it), but using your fork, I can't. Any ideas?
Yeah sorry, this was a bit of a rushed attempt to implement this... I did test this with 2 custom snippets only and it seemed to work. I'll work on the feature when I have time. Thanks for testing though!
I came across this which is basically the same question as this one. Unfortunately, it seems that the issue still exists. Have a look at the video recording below.
https://user-images.githubusercontent.com/17733465/158045172-f8380d7f-3a6d-4eee-b0e3-38364cf78343.mp4