summaryrefslogtreecommitdiffstats
path: root/lua/Snippets
diff options
context:
space:
mode:
authorNanderty <psopka@sopka.ch>2023-04-22 12:10:01 +0200
committerNanderty <psopka@sopka.ch>2023-04-22 12:10:01 +0200
commitd37f266e7719a67faa99b3ec62e9a51f0033cfc2 (patch)
tree7e667b5462d88ae9a593378d3a919349c027153b /lua/Snippets
parent9b3ab411798c36f4402ecb34eb77a0ee86a03447 (diff)
downloadneovim-config-d37f266e7719a67faa99b3ec62e9a51f0033cfc2.tar.gz
neovim-config-d37f266e7719a67faa99b3ec62e9a51f0033cfc2.tar.bz2
neovim-config-d37f266e7719a67faa99b3ec62e9a51f0033cfc2.zip
starter verbesserungen
Diffstat (limited to 'lua/Snippets')
-rw-r--r--lua/Snippets/tex/chemistry.lua13
-rw-r--r--lua/Snippets/tex/general.lua38
-rw-r--r--lua/Snippets/tex/german.lua13
-rw-r--r--lua/Snippets/tex/math.lua39
-rw-r--r--lua/Snippets/tex/symbols.lua30
5 files changed, 130 insertions, 3 deletions
diff --git a/lua/Snippets/tex/chemistry.lua b/lua/Snippets/tex/chemistry.lua
index 5c4742c..ee73154 100644
--- a/lua/Snippets/tex/chemistry.lua
+++ b/lua/Snippets/tex/chemistry.lua
@@ -2,9 +2,9 @@ local tex = require('Snippets.luasniphelperslatex')
local helper = require('Snippets.luasniphelpers')
return {
- s({ trig = ',,', snippetType = 'autosnippet' },
+ s({ trig = 'chg', snippetType = 'autosnippet' },
fmta(
- '\\ch{<>->>[<>][<>]<>}\\par',
+ '\\ch{ <> ->>[ <> ][ <> ] <> }\\par',
{
i(1),
i(2),
@@ -13,4 +13,13 @@ return {
}
)
),
+
+ s({ trig = 'chs', snippetType = 'autosnippet' },
+ fmta(
+ '\\ch{ <> }',
+ {
+ i(1),
+ }
+ )
+ ),
}
diff --git a/lua/Snippets/tex/general.lua b/lua/Snippets/tex/general.lua
index b0a7090..e5514ab 100644
--- a/lua/Snippets/tex/general.lua
+++ b/lua/Snippets/tex/general.lua
@@ -17,6 +17,24 @@ s({ trig = 'new', snippetType = 'autosnippet' },
),
{ condition = helper.line_begin }
),
+ s({ trig = 'ssec', snippetType = 'autosnippet' },
+ fmta(
+ '\\subsection*{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = helper.line_begin }
+ ),
+ s({ trig = 'nsec', snippetType = 'autosnippet' },
+ fmta(
+ '\\newpage\\section*{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = helper.line_begin }
+ ),
s({ trig = 'hh', snippetType = 'autosnippet' },
fmta(
'\\SI{<>}{<>}',
@@ -26,6 +44,26 @@ s({ trig = 'new', snippetType = 'autosnippet' },
}
)
),
+ s({ trig = 'bf', snippetType = 'autosnippet' },
+ fmta(
+ '\\textbf{<>}',
+ {
+ i(1),
+ }
+ )
+ ),
+ s({ trig = 'cite', snippetType = 'autosnippet' },
+ fmta(
+ '\\supercite{<>}',
+ {
+ i(1),
+ }
+ )
+ ),
+ s({ trig = 'ite', snippetType = 'autosnippet' },
+ { t('\\item') },
+ { condition = helper.line_begin }
+ ),
s({ trig = 'upa', snippetType = 'autosnippet' },
fmta(
'\\usepackage{<>}',
diff --git a/lua/Snippets/tex/german.lua b/lua/Snippets/tex/german.lua
new file mode 100644
index 0000000..70b12bf
--- /dev/null
+++ b/lua/Snippets/tex/german.lua
@@ -0,0 +1,13 @@
+local tex = require('Snippets.luasniphelperslatex')
+local helper = require('Snippets.luasniphelpers')
+
+return {
+ s({ trig = 'enq', snippetType = 'autosnippet' },
+ fmta(
+ '\\enquote{<>}',
+ {
+ i(1),
+ }
+ )
+ ),
+}
diff --git a/lua/Snippets/tex/math.lua b/lua/Snippets/tex/math.lua
index 411ac7a..b6c5068 100644
--- a/lua/Snippets/tex/math.lua
+++ b/lua/Snippets/tex/math.lua
@@ -20,7 +20,17 @@ return {
),
{ condition = tex.in_mathzone }
),
- s({ trig = "in", snippetType = "autosnippet" },
+ s({ trig = "sum", snippetType = "autosnippet" },
+ fmta(
+ '\\sum_{<>}^{<>}',
+ {
+ i(1),
+ i(2),
+ }
+ ),
+ { condition = tex.in_mathzone }
+ ),
+ s({ trig = "int", snippetType = "autosnippet" },
fmta(
'\\int_{<>}^{<>}',
{
@@ -30,6 +40,14 @@ return {
),
{ condition = tex.in_mathzone }
),
+ s({ trig = 'nn', snippetType = 'autosnippet' },
+ fmta(
+ '\\num{<>}',
+ {
+ i(1),
+ }
+ )
+ ),
s({ trig = "tex", snippetType = "autosnippet" },
fmta(
'\\text{<>}',
@@ -57,6 +75,15 @@ return {
),
{ condition = tex.in_mathzone }
),
+ s({ trig = "ove", snippetType = "autosnippet" },
+ fmta(
+ '\\overline{<>}',
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_mathzone }
+ ),
s({ trig = 'ΓΆΓΆ', snippetType = 'autosnippet' },
fmta(
'^{<>}',
@@ -66,6 +93,16 @@ return {
),
{ condition = tex.in_mathzone }
),
+ s({ trig = 'gg', snippetType = 'autosnippet' },
+ fmta(
+ '\\sqrt[<>]{<>}',
+ {
+ i(1),
+ i(2),
+ }
+ ),
+ { condition = tex.in_mathzone }
+ ),
s({ trig = 'll', snippetType = 'autosnippet' },
fmta(
'_{<>}',
diff --git a/lua/Snippets/tex/symbols.lua b/lua/Snippets/tex/symbols.lua
index c2ca1d0..ccce14e 100644
--- a/lua/Snippets/tex/symbols.lua
+++ b/lua/Snippets/tex/symbols.lua
@@ -2,6 +2,30 @@ local tex = require('Snippets.luasniphelperslatex')
local helper = require('Snippets.luasniphelpers')
return {
+ s({ trig = 'chi', snippetType = 'autosnippet' },
+ {
+ t('\\chi'),
+ },
+ { condition = tex.in_mathzone }
+ ),
+ s({ trig = 'sig', snippetType = 'autosnippet' },
+ {
+ t('\\sigma'),
+ },
+ { condition = tex.in_mathzone }
+ ),
+ s({ trig = 'nu', snippetType = 'autosnippet' },
+ {
+ t('\\nu'),
+ },
+ { condition = tex.in_mathzone }
+ ),
+ s({ trig = 'alp', snippetType = 'autosnippet' },
+ {
+ t('\\alpha'),
+ },
+ { condition = tex.in_mathzone }
+ ),
s({ trig = 'del', snippetType = 'autosnippet' },
{
t('\\delta '),
@@ -92,4 +116,10 @@ return {
},
{ condition = tex.in_mathzone }
),
+ s({ trig = 'Ria', snippetType = 'autosnippet' },
+ {
+ t('\\Rightarrow'),
+ },
+ { condition = tex.in_mathzone }
+ ),
}