summaryrefslogtreecommitdiffstats
path: root/lua/Snippets
diff options
context:
space:
mode:
authorNanderty <psopka@sopka.ch>2024-09-23 18:31:13 +0200
committerNanderty <psopka@sopka.ch>2024-09-23 18:31:13 +0200
commit4ccaccb6b9848380a9f888211e19a5794b7b4462 (patch)
treec164332fb77ff3c82892da099639dcdb886381d3 /lua/Snippets
parent655fa4e6b95aea334ad6bce548a6c0ed95f451c6 (diff)
downloadneovim-config-4ccaccb6b9848380a9f888211e19a5794b7b4462.tar.gz
neovim-config-4ccaccb6b9848380a9f888211e19a5794b7b4462.tar.bz2
neovim-config-4ccaccb6b9848380a9f888211e19a5794b7b4462.zip
add additional snippets for math.
Diffstat (limited to 'lua/Snippets')
-rw-r--r--lua/Snippets/tex/chemistry.lua2
-rw-r--r--lua/Snippets/tex/general.lua16
-rw-r--r--lua/Snippets/tex/math.lua14
3 files changed, 31 insertions, 1 deletions
diff --git a/lua/Snippets/tex/chemistry.lua b/lua/Snippets/tex/chemistry.lua
index 4fd940e..de28c96 100644
--- a/lua/Snippets/tex/chemistry.lua
+++ b/lua/Snippets/tex/chemistry.lua
@@ -65,7 +65,7 @@ return {
s({ trig = 'cpnd', snippetType = 'autosnippet' },
fmta(
- '(\\cmpd{<>}, \\SI{<>}{\\gram}, \\SI{<>}{\\milli\\mol}, \\SI{<>}{\\equiv})',
+ '(\\cmpd{<>}, \\qty{<>}{\\gram}, \\qty{<>}{\\milli\\mol}, \\qty{<>}{\\equiv})',
{
i(1),
i(2),
diff --git a/lua/Snippets/tex/general.lua b/lua/Snippets/tex/general.lua
index 3debd62..f50e4c2 100644
--- a/lua/Snippets/tex/general.lua
+++ b/lua/Snippets/tex/general.lua
@@ -28,6 +28,13 @@ return {
{ condition = helper.line_begin }
),
+ s({ trig = 'clp', snippetType = 'autosnippet' },
+ {
+ t('\\clearpage'),
+ },
+ { condition = helper.line_begin }
+ ),
+
s({ trig = 'qnt', snippetType = 'autosnippet' },
fmta(
'\\qty{<>}{<>}',
@@ -49,6 +56,15 @@ return {
)
),
+ s({ trig = 'snr', snippetType = 'autosnippet' },
+ fmta(
+ '\\num{<>}',
+ {
+ i(1),
+ }
+ )
+ ),
+
s({ trig = 'snt', snippetType = 'autosnippet' },
fmta(
'\\unit{<>}',
diff --git a/lua/Snippets/tex/math.lua b/lua/Snippets/tex/math.lua
index 256ce10..25a7db9 100644
--- a/lua/Snippets/tex/math.lua
+++ b/lua/Snippets/tex/math.lua
@@ -179,6 +179,20 @@ return {
{ condition = tex.in_mathzone }
),
+ s({ trig = 'bgg', snippetType = 'autosnippet' },
+ {
+ t('\\bigg'),
+ },
+ { condition = tex.in_mathzone }
+ ),
+
+ s({ trig = 'rvr', snippetType = 'autosnippet' },
+ {
+ t('\\rvert'),
+ },
+ { condition = tex.in_mathzone }
+ ),
+
s({ trig = "sin", snippetType = "autosnippet" },
fmta(
'\\sin{\\left(<>\\right)}',