summaryrefslogtreecommitdiffstats
path: root/lua/Snippets/tex/math.lua
diff options
context:
space:
mode:
authorNanderty <psopka@sopka.ch>2024-01-31 15:47:52 +0100
committerNanderty <psopka@sopka.ch>2024-01-31 15:47:52 +0100
commit0d00ee23f35046f8465cb8302b6795d15227dfda (patch)
tree3f3042de3a141e491bc98acd91490a263939a74d /lua/Snippets/tex/math.lua
parent42383b96d9a1b929080824946340d7459d49ac20 (diff)
downloadneovim-config-0d00ee23f35046f8465cb8302b6795d15227dfda.tar.gz
neovim-config-0d00ee23f35046f8465cb8302b6795d15227dfda.tar.bz2
neovim-config-0d00ee23f35046f8465cb8302b6795d15227dfda.zip
Snippets and general improvements
Diffstat (limited to 'lua/Snippets/tex/math.lua')
-rw-r--r--lua/Snippets/tex/math.lua32
1 files changed, 23 insertions, 9 deletions
diff --git a/lua/Snippets/tex/math.lua b/lua/Snippets/tex/math.lua
index 31f92d6..95c4e64 100644
--- a/lua/Snippets/tex/math.lua
+++ b/lua/Snippets/tex/math.lua
@@ -12,7 +12,7 @@ return {
)
),
- s({ trig = "tex", snippetType = "autosnippet" },
+ s({ trig = "txt", snippetType = "autosnippet" },
fmta(
'\\text{<>}',
{
@@ -102,7 +102,7 @@ return {
),
{ condition = tex.in_mathzone }
),
- s({ trig = "ove", snippetType = "autosnippet" },
+ s({ trig = "vrl", snippetType = "autosnippet" },
fmta(
'\\overline{<>}',
{
@@ -122,7 +122,7 @@ return {
{ condition = tex.in_mathzone }
),
- s({ trig = 'gg', snippetType = 'autosnippet' },
+ s({ trig = 'sqr', snippetType = 'autosnippet' },
fmta(
'\\sqrt[<>]{<>}',
{
@@ -143,7 +143,21 @@ return {
{ condition = tex.in_mathzone }
),
- s({ trig = "bb", snippetType = "autosnippet" },
+ s({ trig = "ngl", snippetType = "autosnippet" },
+ {
+ t('\\langle '),
+ },
+ { condition = tex.in_mathzone }
+ ),
+
+ s({ trig = "ngr", snippetType = "autosnippet" },
+ {
+ t('\\rangle '),
+ },
+ { condition = tex.in_mathzone }
+ ),
+
+ s({ trig = "lr", snippetType = "autosnippet" },
fmta(
'\\left(<>\\right)',
{
@@ -154,13 +168,13 @@ return {
),
s({ trig = 'df', snippetType = 'autosnippet' },
- { t('\\,d') },
+ { t('\\,d ') },
{ condition = tex.in_mathzone }
),
s({ trig = "sin", snippetType = "autosnippet" },
fmta(
- '\\sin{(<>)}',
+ '\\sin{\\left(<>\\right)}',
{
i(1),
}
@@ -170,7 +184,7 @@ return {
s({ trig = "cos", snippetType = "autosnippet" },
fmta(
- '\\cos{(<>)}',
+ '\\cos{\\left(<>\\right)}',
{
i(1),
}
@@ -180,7 +194,7 @@ return {
s({ trig = "tan", snippetType = "autosnippet" },
fmta(
- '\\tan{(<>)}',
+ '\\tan{\\left(<>\\right)}',
{
i(1),
}
@@ -208,7 +222,7 @@ return {
{ condition = tex.in_mathzone }
),
- s({ trig = "xpn", snippetType = "autosnippet" },
+ s({ trig = "exp", snippetType = "autosnippet" },
fmta(
'e^{<>}',
{