blob: e0571cf928cf8b449624023ea8a3d51d7f3c392e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
tex = {}
tex.in_mathzone = function()
return vim.fn['vimtex#syntax#in_mathzone']() == 1
end
tex.in_comment = function()
return vim.fn['vimtex#syntax#in_comment']() == 1
end
tex.in_env = function(name)
local is_inside = vim.fn['vimtex#env#is_inside'](name)
return (is_inside[1] > 0 and is_inside[2] > 0)
end
tex.in_enumerate = function()
return tex.in_env('enumerate')
end
return tex
|