I use UltiSnips and YCM, which usually works fine. However, I've noticed an issue for autoexpanded snippets. For example, if I have the snippet
snippet beg "begin/end" bA
\begin{$1}
$0
\end{$1}
and then type beg
in my document, then I end up with
beg$1}
$0
\end{$1}
(Of course, I don't actually see the placeholder $0
and $1
, but that's how it functions.)
If I call the same snippet something like hello
, then nothing bad happens. If I don't autoexpand, everything also works like it's supposed to. But it seems that as soon as the expanded bit includes the snippet trigger word, YCM causes the autoexpansion to break. (I know it's due to YCM since disabling YCM makes everything work fine.)
Does anyone know how I can fix this?
(reposted from stack overflow: https://stackoverflow.com/questions/66216330/ultisnips-autoexpansion-doesnt-work-with-youcompleteme)
UPDATE: I have done some testing and have figured out that calling the error something different doesn't change the results. Instead, it seems that the problem comes from using placeholders (like $1) within curly braces.