neoclide / coc-snippets

Snippets solution for coc.nvim
970 stars 41 forks source link

The trigger is not deleted if it's a nested snippet #311

Closed ucasyfp closed 2 years ago

ucasyfp commented 2 years ago

This behaviour happened after I upgrade coc-snippets to 3.1.2. When I type an "riA" snippet trigger in another snippet, the trigger will be expanded, but won't be deleted. For example, my tex.snippets file contains:

snippet mk "Math" A
$${1}$${0}
endsnippet

snippet "([a-zA-Z])bar" "bar" riA
\overline{`!p snip.rv=match.group(1)`}
endsnippet

and I type "mk" first in neovim, it expands to

$$

at this time I can see a "SNIP" in status bar. Then I type "xbar" between $$, but it expands to

$\overline{x}xbar$
ucasyfp commented 2 years ago

It seems a problem of coc.nvim. It's solved after I rolled back to coc.nvim v.0.0.82(But I don't know which version of coc.nvim causes this issue.)