From 2838cdf27241c85524bff9677e808fdb7963992b Mon Sep 17 00:00:00 2001 From: Auralcat Date: Fri, 13 Mar 2020 16:42:37 -0300 Subject: [PATCH] Add Elixir with clause snippets This is an addition to Elixir's syntax as of version 1.2.0 which wasn't yet included in the current snippet list. --- snippets/elixir-mode/wt | 8 ++++++++ snippets/elixir-mode/wte | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 snippets/elixir-mode/wt create mode 100644 snippets/elixir-mode/wte diff --git a/snippets/elixir-mode/wt b/snippets/elixir-mode/wt new file mode 100644 index 0000000..30acd48 --- /dev/null +++ b/snippets/elixir-mode/wt @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# contributor: Miriam Retka (https://github.com/Auralcat) +# name: wt +# key: wt +# -- +with ${1:{:ok, tuple} <- function(arg)}, do + $0 +end \ No newline at end of file diff --git a/snippets/elixir-mode/wte b/snippets/elixir-mode/wte new file mode 100644 index 0000000..804b586 --- /dev/null +++ b/snippets/elixir-mode/wte @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# contributor: Miriam Retka (https://github.com/Auralcat) +# name: wte +# key: wte +# -- +with ${1:{:ok, tuple} <- function(arg)}, do + $2 +else + $0 +end \ No newline at end of file