diff options
| author | Nanderty <psopka@sopka.ch> | 2023-04-14 23:59:47 +0200 |
|---|---|---|
| committer | Nanderty <psopka@sopka.ch> | 2023-04-14 23:59:47 +0200 |
| commit | 59cb5af26b9f7b9c626bef058ab4e7e8666ff9ec (patch) | |
| tree | c9fa182a3c4b69b78c499e312c014c4bd3c17f18 /lua/Snippets | |
| parent | 4251a22f679ddf22ac40cb83ac618d367e57e762 (diff) | |
| download | neovim-config-59cb5af26b9f7b9c626bef058ab4e7e8666ff9ec.tar.gz neovim-config-59cb5af26b9f7b9c626bef058ab4e7e8666ff9ec.tar.bz2 neovim-config-59cb5af26b9f7b9c626bef058ab4e7e8666ff9ec.zip | |
Snippets
Diffstat (limited to 'lua/Snippets')
| -rw-r--r-- | lua/Snippets/tex/general.lua | 9 | ||||
| -rw-r--r-- | lua/Snippets/tex/math.lua | 80 | ||||
| -rw-r--r-- | lua/Snippets/tex/symbols.lua | 78 |
3 files changed, 151 insertions, 16 deletions
diff --git a/lua/Snippets/tex/general.lua b/lua/Snippets/tex/general.lua index 78c2a2c..b0a7090 100644 --- a/lua/Snippets/tex/general.lua +++ b/lua/Snippets/tex/general.lua @@ -45,13 +45,4 @@ s({ trig = 'new', snippetType = 'autosnippet' }, ), { condition = helper.line_begin } ), - s({ trig = '^', snippetType = 'autosnippet' }, - fmta( - '^{<>}', - { - i(1), - } - ), - { condition = tex.in_mathzone } - ), } diff --git a/lua/Snippets/tex/math.lua b/lua/Snippets/tex/math.lua index 08a3bfe..411ac7a 100644 --- a/lua/Snippets/tex/math.lua +++ b/lua/Snippets/tex/math.lua @@ -2,6 +2,14 @@ local tex = require('Snippets.luasniphelperslatex') local helper = require('Snippets.luasniphelpers') return { + s({ trig = '$', snippetType = 'autosnippet' }, + fmta( + '$<>$', + { + i(1), + } + ) + ), s({ trig = '/', snippetType = 'autosnippet' }, fmta( '\\frac{<>}{<>}', @@ -31,16 +39,80 @@ return { ), { condition = tex.in_mathzone } ), + s({ trig = "vec", snippetType = "autosnippet" }, + fmta( + '\\vec{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = "hat", snippetType = "autosnippet" }, + fmta( + '\\hat{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = 'ΓΆΓΆ', snippetType = 'autosnippet' }, + fmta( + '^{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = 'll', snippetType = 'autosnippet' }, + fmta( + '_{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = "bb", snippetType = "autosnippet" }, + fmta( + '\\left(<>\\right)', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), s({ trig = 'df', snippetType = 'autosnippet' }, { t('\\diff ') }, { condition = tex.in_mathzone } ), - s({ trig = 'ble', snippetType = 'autosnippet' }, - { t('\\left(') }, + s({ trig = "sin", snippetType = "autosnippet" }, + fmta( + '\\sin{<>}', + { + i(1), + } + ), + { condition = tex.in_mathzone } + ), + s({ trig = "cos", snippetType = "autosnippet" }, + fmta( + '\\cos{<>}', + { + i(1), + } + ), { condition = tex.in_mathzone } ), - s({ trig = 'bri', snippetType = 'autosnippet' }, - { t('\\right)') }, + s({ trig = "tan", snippetType = "autosnippet" }, + fmta( + '\\tan{<>}', + { + i(1), + } + ), { condition = tex.in_mathzone } ), } diff --git a/lua/Snippets/tex/symbols.lua b/lua/Snippets/tex/symbols.lua index f0cd088..c2ca1d0 100644 --- a/lua/Snippets/tex/symbols.lua +++ b/lua/Snippets/tex/symbols.lua @@ -2,21 +2,93 @@ local tex = require('Snippets.luasniphelperslatex') local helper = require('Snippets.luasniphelpers') return { + s({ trig = 'del', snippetType = 'autosnippet' }, + { + t('\\delta '), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'phi', snippetType = 'autosnippet' }, + { + t('\\phi '), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'Phi', snippetType = 'autosnippet' }, + { + t('\\Phi '), + }, + { condition = tex.in_mathzone } + ), s({ trig = 'pi', snippetType = 'autosnippet' }, { - t('\\pi'), + t('\\pi '), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'nab', snippetType = 'autosnippet' }, + { + t('\\nabla '), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'mu', snippetType = 'autosnippet' }, + { + t('\\mu '), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'eps', snippetType = 'autosnippet' }, + { + t('\\epsilon '), + }, + { condition = tex.in_mathzone } + ), + s({ trig = '0mu', snippetType = 'autosnippet' }, + { + t('\\mu_0 '), }, { condition = tex.in_mathzone } ), s({ trig = '0eps', snippetType = 'autosnippet' }, { - t('\\epsilon_0'), + t('\\epsilon_0 '), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'cdo', snippetType = 'autosnippet' }, + { + t('\\cdot '), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'tim', snippetType = 'autosnippet' }, + { + t('\\times '), }, { condition = tex.in_mathzone } ), s({ trig = 'app', snippetType = 'autosnippet' }, { - t('\\approx'), + t('\\approx '), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'leq', snippetType = 'autosnippet' }, + { + t('\\leq '), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'geq', snippetType = 'autosnippet' }, + { + t('\\geq '), + }, + { condition = tex.in_mathzone } + ), + s({ trig = 'neq', snippetType = 'autosnippet' }, + { + t('\\neq '), }, { condition = tex.in_mathzone } ), |
