and the above nvim configuration cmp + luasnip exhibits the following behaviour.
If \textbf appears nowhere in the tex file before, it expands correctly to \textbf{}. If \textbf{} appears somewhere in the file instead it expands to bf}{}. If the luasnip trigger is changed to trig = '//' the expansion is correct every time.
FAQ
Announcement
Minimal reproducible full config
Description
Given the luasnip snippet
and the above nvim configuration cmp + luasnip exhibits the following behaviour.
If \textbf appears nowhere in the tex file before, it expands correctly to
\textbf{}
. If \textbf{} appears somewhere in the file instead it expands tobf}{}
. If the luasnip trigger is changed totrig = '//'
the expansion is correct every time.Steps to reproduce
Open a *.tex file
and enter the trigger
bf
once and after completing the snippet write the trigger again.Expected behavior
The snippet correctly expands to
\textbf{}
every time.Actual behavior
The snippet correctly expands to
\textbf{}
every time.Additional context
I am aware the
view.entries = 'native'
is considered experimental. I changed my config toview.entries = 'custom'
. This solved the issue.