by ashton314 · 5y ago · 0 comments
https://gist.github.com/ashton314/f0a90a46e39b103635f2be8d8e...
The second one adds a pipe in front, which is super handy. Yours gives me some ideas though…
Ah, figured it out. It's very powerful to be able to call elisp inside snippets. Here's my new Labeled Inspect snippet:
# -*- mode: snippet -*-
# name: Labeled Inspect
# key: lin
# --
IO.inspect($1, label: "$2$1 (`(buffer-name)`:`(line-number-at-pos))`")
and a piped version: # -*- mode: snippet -*-
# name: Piped Inspect
# key: pin
# --
|> IO.inspect(label: "$2$1 (`(buffer-name)`:`(line-number-at-pos))`")