summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lua/Snippets/tex/figures.lua55
-rw-r--r--lua/Snippets/tex/general.lua4
-rw-r--r--lua/Snippets/tex/sections.lua2
-rw-r--r--lua/Snippets/tex/tables.lua52
-rw-r--r--lua/plugins/colorscheme.lua2
5 files changed, 102 insertions, 13 deletions
diff --git a/lua/Snippets/tex/figures.lua b/lua/Snippets/tex/figures.lua
index 3cbed87..81a4368 100644
--- a/lua/Snippets/tex/figures.lua
+++ b/lua/Snippets/tex/figures.lua
@@ -11,8 +11,7 @@ return {
\chemfig {
<>
}
- \caption{
- <>
+ \caption{<>
}
\label{fig:<>}
\end{figure}
@@ -36,8 +35,7 @@ return {
<>
}
\schemestop
- \caption{
- <>
+ \caption{<>
}
\label{fig:<>}
\end{figure}
@@ -59,8 +57,7 @@ return {
\includegraphics
[<>]
{<>}
- \caption{
- <>
+ \caption{<>
}
\label{fig:<>}
\end{figure}
@@ -84,8 +81,7 @@ return {
{<>}
{!}
{\input{<>}}
- \caption{
- <>
+ \caption{<>
}
\label{fig:<>}
\end{figure}
@@ -100,7 +96,7 @@ return {
{ condition = helper.line_begin }
),
- s({ trig = 'sch', snippetType = 'autosnippet' },
+ s({ trig = 'scm', snippetType = 'autosnippet' },
fmta(
[[
\schemestart
@@ -184,6 +180,27 @@ return {
{ condition = tex.in_figure }
),
+ s({ trig = 'brc', snippetType = 'autosnippet' },
+ fmta(
+ [[
+\polymerdelim[height = <>, depth = <>,
+ open xshift=<>, close xshift=<>,
+ indice = \!\!<>]
+ {op<>}{cl<>}
+]],
+ {
+ i(1),
+ i(2),
+ i(3),
+ i(4),
+ i(5),
+ i(6),
+ i(7),
+ }
+ ),
+ { condition = tex.in_figure }
+ ),
+
s({ trig = 'nme', snippetType = 'autosnippet' },
fmta(
[[
@@ -208,4 +225,24 @@ return {
{ t('\\oplus') },
{ condition = tex.in_figure }
),
+
+ s({ trig = 'crp', snippetType = 'autosnippet' },
+ fmta(
+ [[(-[::<>,0.2,,,draw=none]\oplus)]],
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_figure }
+ ),
+
+ s({ trig = 'crm', snippetType = 'autosnippet' },
+ fmta(
+ [[(-[::<>,0.2,,,draw=none]\ominus)]],
+ {
+ i(1),
+ }
+ ),
+ { condition = tex.in_figure }
+ ),
}
diff --git a/lua/Snippets/tex/general.lua b/lua/Snippets/tex/general.lua
index 23d2e60..089edef 100644
--- a/lua/Snippets/tex/general.lua
+++ b/lua/Snippets/tex/general.lua
@@ -21,14 +21,14 @@ return {
)
),
- s({ trig = 'new', snippetType = 'autosnippet' },
+ s({ trig = 'nwp', snippetType = 'autosnippet' },
{
t('\\newpage'),
},
{ condition = helper.line_begin }
),
- s({ trig = 'hh', snippetType = 'autosnippet' },
+ s({ trig = 'snt', snippetType = 'autosnippet' },
fmta(
'\\SI{<>}{<>}',
{
diff --git a/lua/Snippets/tex/sections.lua b/lua/Snippets/tex/sections.lua
index 582201e..28640fc 100644
--- a/lua/Snippets/tex/sections.lua
+++ b/lua/Snippets/tex/sections.lua
@@ -45,7 +45,7 @@ return {
s({ trig = 'sss', snippetType = 'autosnippet' },
fmta(
- '\\newpage\\subsubsection{<>}',
+ '\\subsubsection{<>}',
{
i(1),
}
diff --git a/lua/Snippets/tex/tables.lua b/lua/Snippets/tex/tables.lua
new file mode 100644
index 0000000..80531e1
--- /dev/null
+++ b/lua/Snippets/tex/tables.lua
@@ -0,0 +1,52 @@
+local helper = require('Snippets.luasniphelpers')
+local helper = require('Snippets.luasniphelpers')
+
+return {
+
+ s({ trig = 'tbl', snippetType = 'autosnippet' },
+ fmta(
+ [[
+\begin{table}[!h]
+ \centering
+ \begin{tabular}{ <> }
+ <>
+ \end{tabular}
+ \caption{<>
+ }
+ \label{fig:<>}
+\end{table}
+]],
+ {
+ i(1),
+ i(2),
+ i(3),
+ i(4),
+ }
+ ),
+ { condition = helper.line_begin }
+ ),
+
+ s({ trig = 'tbx', snippetType = 'autosnippet' },
+ fmta(
+ [[
+\begin{table}[!h]
+ \centering
+ \begin{tabularx}{\textwidth}{ <> }
+ <>
+ \end{tabularx}
+ \caption{<>
+ }
+ \label{fig:<>}
+\end{table}
+]],
+ {
+ i(1),
+ i(2),
+ i(3),
+ i(4),
+ }
+ ),
+ { condition = helper.line_begin }
+ ),
+
+}
diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua
index 42c977c..624bba4 100644
--- a/lua/plugins/colorscheme.lua
+++ b/lua/plugins/colorscheme.lua
@@ -32,7 +32,7 @@ return {
}
end,
})
- vim.cmd('colorscheme monokai-pro')
+ vim.cmd.colorscheme('monokai-pro')
end,
},
}