From edc3ccce17b2c1dc9ce9df40cd37e25a04e758df Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Fri, 3 Jun 2022 15:48:35 -0700 Subject: [PATCH] Update snippet lists --- nvim/.config/nvim/UltiSnips/crystal.snippets | 37 ++++++++++++++++++++ nvim/.config/nvim/UltiSnips/tex.snippets | 20 +++++++++++ 2 files changed, 57 insertions(+) create mode 100644 nvim/.config/nvim/UltiSnips/crystal.snippets diff --git a/nvim/.config/nvim/UltiSnips/crystal.snippets b/nvim/.config/nvim/UltiSnips/crystal.snippets new file mode 100644 index 0000000..d66904c --- /dev/null +++ b/nvim/.config/nvim/UltiSnips/crystal.snippets @@ -0,0 +1,37 @@ +snippet md "map with do" w +map do |${1:e}| + $2 +end +$0 +endsnippet + +snippet m{ "map with {" w +map({ |${1:e}| $2 }) +endsnippet + +snippet ed "each with do" w +each do |${1:e}| + $2 +end +$0 +endsnippet + +snippet e{ "each with {" w +each({ |${1:e}| $2 }) +endsnippet + +snippet b "apply block" w +${1:min_by}({|${2:e}| $3 }) +endsnippet + +snippet set "create set" w +Set(${1:Int32}).new +endsnippet + +snippet ha "create hash" w +Hash($1).new +endsnippet + +snippet in "includes?" w +includes?($1) +endsnippet diff --git a/nvim/.config/nvim/UltiSnips/tex.snippets b/nvim/.config/nvim/UltiSnips/tex.snippets index 2c113b8..667e83c 100644 --- a/nvim/.config/nvim/UltiSnips/tex.snippets +++ b/nvim/.config/nvim/UltiSnips/tex.snippets @@ -22,6 +22,12 @@ snippet ssec \subsection*{$1} endsnippet +snippet ol +\begin{itemize} + $1 +\end{itemize} +endsnippet + snippet alist \begin{enumerate}[label=\alph*)] $1 @@ -47,3 +53,17 @@ endsnippet snippet e \epsilon endsnippet + +snippet hs +\begin{lstlisting}[language=Haskell] +$1 +\end{lstlisting} +endsnippet + +snippet ns +\needscite{} +endsnippet + +snippet todo +\TODO{$1} +endsnippet