summaryrefslogtreecommitdiffstats
path: root/lua/Snippets/luasniphelperslatex.lua
diff options
context:
space:
mode:
authorNanderty <psopka@sopka.ch>2023-05-20 12:04:36 +0200
committerNanderty <psopka@sopka.ch>2023-05-20 12:04:36 +0200
commitb899d885a8672df51e6c7fe6ed3837bac008467f (patch)
treed26374000f0c9f66e0a1d872027924b812370fa3 /lua/Snippets/luasniphelperslatex.lua
parent95686ce8c52cab5d43ec5cc031ce3758589a5f8f (diff)
downloadneovim-config-b899d885a8672df51e6c7fe6ed3837bac008467f.tar.gz
neovim-config-b899d885a8672df51e6c7fe6ed3837bac008467f.tar.bz2
neovim-config-b899d885a8672df51e6c7fe6ed3837bac008467f.zip
colorscheme, telescope
Diffstat (limited to 'lua/Snippets/luasniphelperslatex.lua')
-rw-r--r--lua/Snippets/luasniphelperslatex.lua34
1 files changed, 14 insertions, 20 deletions
diff --git a/lua/Snippets/luasniphelperslatex.lua b/lua/Snippets/luasniphelperslatex.lua
index a31e714..e0571cf 100644
--- a/lua/Snippets/luasniphelperslatex.lua
+++ b/lua/Snippets/luasniphelperslatex.lua
@@ -1,26 +1,20 @@
-local M = {}
+tex = {}
-M.in_mathzone = function()
- return vim.fn['vimtex#syntax#in_mathzone']() == 1
+tex.in_mathzone = function()
+ return vim.fn['vimtex#syntax#in_mathzone']() == 1
end
-M.in_text = function()
- return not tex_utils.in_mathzone()
-end
-M.in_comment = function()
- return vim.fn['vimtex#syntax#in_comment']() == 1
-end
-M.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
-M.in_equation = function()
- return tex_utils.in_env('equation')
+
+tex.in_comment = function()
+ return vim.fn['vimtex#syntax#in_comment']() == 1
end
-M.in_itemize = function()
- return tex_utils.in_env('itemize')
+
+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
-M.in_tikz = function()
- return tex_utils.in_env('tikzpicture')
+
+tex.in_enumerate = function()
+ return tex.in_env('enumerate')
end
-return M
+return tex