Steps to reproduce
This is at the top of my ~/.config/nvim/UltiSnips/tex.snippets file:
(...)
extends latex/math
(...)
And this is in my ~/.config/nvim/UltiSnips/latex/math.snippets:
global !p
texMathZones = [
'texMathZone' + x for x in [
'A',
'AS',
'B',
'BS',
'C',
'CS',
'D',
'DS',
'E',
'ES',
'F',
'FS',
'G',
'GS',
'H',
'HS',
'I',
'IS',
'J',
'JS',
'K',
'KS',
'L',
'LS',
'DS',
'V',
'W',
'X',
'Y',
'Z',
'AmsA',
'AmsB',
'AmsC',
'AmsD',
'AmsE',
'AmsF',
'AmsG',
'AmsAS',
'AmsBS',
'AmsCS',
'AmsDS',
'AmsES',
'AmsFS',
'AmsGS'
]
]
texIgnoreMathZones = ['texMathText']
texMathZoneIds = vim.eval('map(' + str(texMathZones) + ", 'hlID(v:val)')")
texIgnoreMathZoneIds = vim.eval('map('+str(texIgnoreMathZones)+", 'hlID(v:val)')")
ignore = texIgnoreMathZoneIds[0]
def math():
synstackids = vim.eval("synstack(line('.'), col('.') - (col('.')>=2 ? 1 : 0))")
try:
first = next(i for i in reversed(synstackids) if i in texIgnoreMathZoneIds or i in texMathZoneIds)
return first != ignore
except StopIteration:
return False
endglobal
(...)
context "math()"
snippet frac "\frac{}{}" wA
\frac{$1}{$2}$0
endsnippet
Operating System: Arch Linux
Vim Version:
NVIM v0.4.4
Build type: Release
UltiSnips Version:
It should be the latest release version since I installed it with vim-plug and updated all packages with :PlugUpdate a few minutes ago.
Python inside Vim:
3.8.6
Docker repo/vimrc:
I don't really understand, what you need here.
Hint:
It worked before but I don't know exactly when it started to break.
Expected behavior: That my snippet expands.
Actual behavior: It doesn't expand:
Steps to reproduce This is at the top of my
~/.config/nvim/UltiSnips/tex.snippets
file:And this is in my
~/.config/nvim/UltiSnips/latex/math.snippets
:vim-plug
and updated all packages with:PlugUpdate
a few minutes ago.Hint:
It worked before but I don't know exactly when it started to break.