summaryrefslogtreecommitdiffstats
path: root/lua/Snippets
diff options
context:
space:
mode:
authorNanderty <psopka@sopka.ch>2024-03-19 22:21:51 +0100
committerNanderty <psopka@sopka.ch>2024-03-19 22:21:51 +0100
commit338818c744c0c9138a519ad01818e69c6c21faae (patch)
treea1f532e1c4d288fd0b77811d17f67447f6376d11 /lua/Snippets
parent9c1e8d2880e8d0ddac0d9860a977c1ef345acb35 (diff)
downloadneovim-config-338818c744c0c9138a519ad01818e69c6c21faae.tar.gz
neovim-config-338818c744c0c9138a519ad01818e69c6c21faae.tar.bz2
neovim-config-338818c744c0c9138a519ad01818e69c6c21faae.zip
Fix treesitter for tex, add whitespace indicator in visual mode
Diffstat (limited to 'lua/Snippets')
-rw-r--r--lua/Snippets/tex/math.lua27
-rw-r--r--lua/Snippets/tex/schemes.lua4
-rw-r--r--lua/Snippets/tex/symbols.lua7
3 files changed, 36 insertions, 2 deletions
diff --git a/lua/Snippets/tex/math.lua b/lua/Snippets/tex/math.lua
index 95c4e64..256ce10 100644
--- a/lua/Snippets/tex/math.lua
+++ b/lua/Snippets/tex/math.lua
@@ -167,6 +167,13 @@ return {
{ condition = tex.in_mathzone }
),
+ s({ trig = 'mdl', snippetType = 'autosnippet' },
+ {
+ t('\\middle'),
+ },
+ { condition = tex.in_mathzone }
+ ),
+
s({ trig = 'df', snippetType = 'autosnippet' },
{ t('\\,d ') },
{ condition = tex.in_mathzone }
@@ -231,4 +238,24 @@ return {
),
{ condition = tex.in_mathzone }
),
+
+ s({ trig = "bra", snippetType = "autosnippet" },
+ fmta(
+ '\\Bra{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_mathzone }
+ ),
+
+ s({ trig = "ket", snippetType = "autosnippet" },
+ fmta(
+ '\\Ket{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_mathzone }
+ ),
}
diff --git a/lua/Snippets/tex/schemes.lua b/lua/Snippets/tex/schemes.lua
index ae93b31..f87552a 100644
--- a/lua/Snippets/tex/schemes.lua
+++ b/lua/Snippets/tex/schemes.lua
@@ -203,7 +203,7 @@ return {
s({ trig = 'crm', snippetType = 'autosnippet' },
fmta(
- [[\charge{<>=$\ominus$}{<>}]],
+ [[\charge{<>=\ominus}{<>}]],
{
i(1),
i(2),
@@ -214,7 +214,7 @@ return {
s({ trig = 'crp', snippetType = 'autosnippet' },
fmta(
- [[\charge{<>=$\oplus$}{<>}]],
+ [[\charge{<>=\oplus}{<>}]],
{
i(1),
i(2),
diff --git a/lua/Snippets/tex/symbols.lua b/lua/Snippets/tex/symbols.lua
index 76935db..4fd52c9 100644
--- a/lua/Snippets/tex/symbols.lua
+++ b/lua/Snippets/tex/symbols.lua
@@ -59,6 +59,13 @@ return {
{ condition = tex.in_mathzone }
),
+ s({ trig = 'plm', snippetType = 'autosnippet' },
+ {
+ t('\\pm '),
+ },
+ { condition = tex.in_mathzone }
+ ),
+
s({ trig = 'leq', snippetType = 'autosnippet' },
{
t('\\leq '),