Skip to content

Commit 89ec760

Browse files
authored
Merge pull request #311 from huynh91/master
Elixir: make hcall, hcast, and hinfo snippets more general
2 parents eea01c5 + 2f6a24d commit 89ec760

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

snippets/elixir-mode/hcall

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# name: hcall
33
# key: hcall
44
# --
5-
def handle_call($1, _from, state) do
6-
reply = $0
7-
{:reply, reply, state}
5+
def handle_call($1, _from, ${2:state}) do
6+
$0
87
end

snippets/elixir-mode/hcast

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# name: hcast
33
# key: hcast
44
# --
5-
def handle_cast($1, state) do
5+
def handle_cast($1, ${2:state}) do
66
$0
7-
{:noreply, state}
87
end

snippets/elixir-mode/hinfo

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# name: hinfo
33
# key: hinfo
44
# --
5-
def handle_info($1, state) do
5+
def handle_info($1, ${2:state}) do
66
$0
7-
{:noreply, state}
87
end

0 commit comments

Comments
 (0)