diff options
| author | Nanderty <psopka@sopka.ch> | 2024-11-24 16:45:51 +0100 |
|---|---|---|
| committer | Nanderty <psopka@sopka.ch> | 2024-11-24 16:45:51 +0100 |
| commit | e711158bb790bdcb6634df9521c880e9eb0c1d6b (patch) | |
| tree | 92af30711edcd92ec15f937ea9a1a53ded741966 /lua/Snippets/tex/math.lua | |
| parent | 80af2a08c9c3bfad90cdcfd916c76ec32119e187 (diff) | |
| download | neovim-config-e711158bb790bdcb6634df9521c880e9eb0c1d6b.tar.gz neovim-config-e711158bb790bdcb6634df9521c880e9eb0c1d6b.tar.bz2 neovim-config-e711158bb790bdcb6634df9521c880e9eb0c1d6b.zip | |
Snippet improvements
Diffstat (limited to 'lua/Snippets/tex/math.lua')
| -rw-r--r-- | lua/Snippets/tex/math.lua | 90 |
1 files changed, 77 insertions, 13 deletions
diff --git a/lua/Snippets/tex/math.lua b/lua/Snippets/tex/math.lua index ddaf2a2..33903a6 100644 --- a/lua/Snippets/tex/math.lua +++ b/lua/Snippets/tex/math.lua @@ -65,13 +65,11 @@ return { { condition = tex.in_mathzone } ), - s({ trig = 'hhn', snippetType = 'autosnippet' }, - fmta( - '\\num{<>}', - { - i(1), - } - ) + s({ trig = 'prt', snippetType = 'autosnippet' }, + { + t('\\partial ') + }, + { condition = tex.in_mathzone } ), s({ trig = 'mcl', snippetType = 'autosnippet' }, @@ -102,6 +100,17 @@ return { ), { condition = tex.in_mathzone } ), + + s({ trig = "tld", snippetType = "autosnippet" }, + fmta( + '\\tilde{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = "vrl", snippetType = "autosnippet" }, fmta( '\\overline{<>}', @@ -112,6 +121,26 @@ return { { condition = tex.in_mathzone } ), + s({ trig = "bar", snippetType = "autosnippet" }, + fmta( + '\\bar{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + + s({ trig = "bsl", snippetType = "autosnippet" }, + fmta( + '\\boldsymbol{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = 'ΓΆΓΆ', snippetType = 'autosnippet' }, fmta( '^{<>}', @@ -174,9 +203,9 @@ return { { condition = tex.in_mathzone } ), - s({ trig = 'str', snippetType = 'autosnippet' }, + s({ trig = 'dgg', snippetType = 'autosnippet' }, { - t('\\star '), + t('\\dagger '), }, { condition = tex.in_mathzone } ), @@ -230,7 +259,7 @@ return { { condition = tex.in_mathzone } ), - s({ trig = "det", snippetType = "autosnippet" }, + s({ trig = "dets", snippetType = "autosnippet" }, fmta( '\\det{(<>)}', { @@ -240,6 +269,30 @@ return { { condition = tex.in_mathzone } ), + s({ trig = "detm", snippetType = "autosnippet" }, + fmta([[\det{\begin{vmatrix} + <> +\end{vmatrix}} +]], + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + + s({ trig = "mtrx", snippetType = "autosnippet" }, + fmta([[\begin{pmatrix} + <> +\end{pmatrix} +]], + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = "ln", snippetType = "autosnippet" }, fmta( '\\ln{(<>)}', @@ -252,7 +305,7 @@ return { s({ trig = "exp", snippetType = "autosnippet" }, fmta( - 'e^{<>}', + '\\exp\\left(<>\\right)', { i(1), } @@ -262,7 +315,7 @@ return { s({ trig = "bra", snippetType = "autosnippet" }, fmta( - '\\Bra{<>}', + '\\left\\langle <>\\right|', { i(1), } @@ -272,9 +325,20 @@ return { s({ trig = "ket", snippetType = "autosnippet" }, fmta( - '\\Ket{<>}', + '\\left| <>\\right\\rangle', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + + s({ trig = "brkt", snippetType = "autosnippet" }, + fmta( + '\\left\\langle <>\\middle| <>\\right\\rangle', { i(1), + i(2), } ), { condition = tex.in_mathzone } |
