summaryrefslogtreecommitdiffstats
path: root/lua/Snippets/tex/math.lua
diff options
context:
space:
mode:
authorNanderty <psopka@sopka.ch>2023-04-14 23:59:47 +0200
committerNanderty <psopka@sopka.ch>2023-04-14 23:59:47 +0200
commit59cb5af26b9f7b9c626bef058ab4e7e8666ff9ec (patch)
treec9fa182a3c4b69b78c499e312c014c4bd3c17f18 /lua/Snippets/tex/math.lua
parent4251a22f679ddf22ac40cb83ac618d367e57e762 (diff)
downloadneovim-config-59cb5af26b9f7b9c626bef058ab4e7e8666ff9ec.tar.gz
neovim-config-59cb5af26b9f7b9c626bef058ab4e7e8666ff9ec.tar.bz2
neovim-config-59cb5af26b9f7b9c626bef058ab4e7e8666ff9ec.zip
Snippets
Diffstat (limited to 'lua/Snippets/tex/math.lua')
-rw-r--r--lua/Snippets/tex/math.lua80
1 files changed, 76 insertions, 4 deletions
diff --git a/lua/Snippets/tex/math.lua b/lua/Snippets/tex/math.lua
index 08a3bfe..411ac7a 100644
--- a/lua/Snippets/tex/math.lua
+++ b/lua/Snippets/tex/math.lua
@@ -2,6 +2,14 @@ local tex = require('Snippets.luasniphelperslatex')
local helper = require('Snippets.luasniphelpers')
return {
+ s({ trig = '$', snippetType = 'autosnippet' },
+ fmta(
+ '$<>$',
+ {
+ i(1),
+ }
+ )
+ ),
s({ trig = '/', snippetType = 'autosnippet' },
fmta(
'\\frac{<>}{<>}',
@@ -31,16 +39,80 @@ return {
),
{ condition = tex.in_mathzone }
),
+ s({ trig = "vec", snippetType = "autosnippet" },
+ fmta(
+ '\\vec{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_mathzone }
+ ),
+ s({ trig = "hat", snippetType = "autosnippet" },
+ fmta(
+ '\\hat{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_mathzone }
+ ),
+ s({ trig = 'ΓΆΓΆ', snippetType = 'autosnippet' },
+ fmta(
+ '^{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_mathzone }
+ ),
+ s({ trig = 'll', snippetType = 'autosnippet' },
+ fmta(
+ '_{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_mathzone }
+ ),
+ s({ trig = "bb", snippetType = "autosnippet" },
+ fmta(
+ '\\left(<>\\right)',
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_mathzone }
+ ),
s({ trig = 'df', snippetType = 'autosnippet' },
{ t('\\diff ') },
{ condition = tex.in_mathzone }
),
- s({ trig = 'ble', snippetType = 'autosnippet' },
- { t('\\left(') },
+ s({ trig = "sin", snippetType = "autosnippet" },
+ fmta(
+ '\\sin{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_mathzone }
+ ),
+ s({ trig = "cos", snippetType = "autosnippet" },
+ fmta(
+ '\\cos{<>}',
+ {
+ i(1),
+ }
+ ),
{ condition = tex.in_mathzone }
),
- s({ trig = 'bri', snippetType = 'autosnippet' },
- { t('\\right)') },
+ s({ trig = "tan", snippetType = "autosnippet" },
+ fmta(
+ '\\tan{<>}',
+ {
+ i(1),
+ }
+ ),
{ condition = tex.in_mathzone }
),
}