summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNanderty <psopka@sopka.ch>2023-11-09 18:03:22 +0100
committerNanderty <psopka@sopka.ch>2023-11-09 18:03:22 +0100
commit42383b96d9a1b929080824946340d7459d49ac20 (patch)
tree1010b642c7d1f72416e0b33fe406d11f1ea04ad4
parentb4399bedea5e8b3fb6612b4c5483248f09089efc (diff)
downloadneovim-config-42383b96d9a1b929080824946340d7459d49ac20.tar.gz
neovim-config-42383b96d9a1b929080824946340d7459d49ac20.tar.bz2
neovim-config-42383b96d9a1b929080824946340d7459d49ac20.zip
chemistry snippets
-rw-r--r--lua/Snippets/tex/chemistry.lua30
-rw-r--r--lua/Snippets/tex/general.lua6
-rw-r--r--lua/Snippets/tex/math.lua10
-rw-r--r--lua/Snippets/tex/schemes.lua28
4 files changed, 65 insertions, 9 deletions
diff --git a/lua/Snippets/tex/chemistry.lua b/lua/Snippets/tex/chemistry.lua
index 3446fba..7a6d889 100644
--- a/lua/Snippets/tex/chemistry.lua
+++ b/lua/Snippets/tex/chemistry.lua
@@ -35,4 +35,34 @@ return {
}
)
),
+
+ s({ trig = 'sbd', snippetType = 'autosnippet' },
+ fmta(
+ '-[::<>]',
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_scheme }
+ ),
+
+ s({ trig = 'dbd', snippetType = 'autosnippet' },
+ fmta(
+ '=[::<>]',
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_scheme }
+ ),
+
+ s({ trig = 'rrw', snippetType = 'autosnippet' },
+ fmta(
+ '@{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_scheme }
+ ),
}
diff --git a/lua/Snippets/tex/general.lua b/lua/Snippets/tex/general.lua
index b90e20b..0c6521d 100644
--- a/lua/Snippets/tex/general.lua
+++ b/lua/Snippets/tex/general.lua
@@ -49,7 +49,7 @@ return {
)
),
- s({ trig = 'bft', snippetType = 'autosnippet' },
+ s({ trig = 'tbf', snippetType = 'autosnippet' },
fmta(
'\\textbf{<>}',
{
@@ -58,7 +58,7 @@ return {
)
),
- s({ trig = 'tlt', snippetType = 'autosnippet' },
+ s({ trig = 'tlc', snippetType = 'autosnippet' },
fmta(
'\\textit{<>}',
{
@@ -85,7 +85,7 @@ return {
}
)
),
- s({ trig = 'cte', snippetType = 'autosnippet' },
+ s({ trig = 'spc', snippetType = 'autosnippet' },
fmta(
'\\supercite{<>}',
{
diff --git a/lua/Snippets/tex/math.lua b/lua/Snippets/tex/math.lua
index 53a2807..31f92d6 100644
--- a/lua/Snippets/tex/math.lua
+++ b/lua/Snippets/tex/math.lua
@@ -207,4 +207,14 @@ return {
),
{ condition = tex.in_mathzone }
),
+
+ s({ trig = "xpn", snippetType = "autosnippet" },
+ fmta(
+ 'e^{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_mathzone }
+ ),
}
diff --git a/lua/Snippets/tex/schemes.lua b/lua/Snippets/tex/schemes.lua
index fcb6579..ae93b31 100644
--- a/lua/Snippets/tex/schemes.lua
+++ b/lua/Snippets/tex/schemes.lua
@@ -30,9 +30,11 @@ return {
\begin{scheme}[!h]
\centering
\schemestart
- \chemfig {
- <>
- }
+ \chemname{
+ \chemfig {
+ <>
+ }
+ }{}
\schemestop
\caption{<>
}
@@ -187,11 +189,13 @@ return {
{ condition = tex.in_scheme }
),
- s({ trig = 'crp', snippetType = 'autosnippet' },
+ s({ trig = 'nmbr', snippetType = 'autosnippet' },
fmta(
- [[(-[::<>,0.4,,,draw=none]\oplus)]],
+ [[(-[::<>,0.4,,,draw=none]{\color{<>}<>})]],
{
i(1),
+ i(2),
+ i(3),
}
),
{ condition = tex.in_scheme }
@@ -199,9 +203,21 @@ return {
s({ trig = 'crm', snippetType = 'autosnippet' },
fmta(
- [[(-[::<>,0.4,,,draw=none]\ominus)]],
+ [[\charge{<>=$\ominus$}{<>}]],
+ {
+ i(1),
+ i(2),
+ }
+ ),
+ { condition = tex.in_scheme }
+ ),
+
+ s({ trig = 'crp', snippetType = 'autosnippet' },
+ fmta(
+ [[\charge{<>=$\oplus$}{<>}]],
{
i(1),
+ i(2),
}
),
{ condition = tex.in_scheme }