← All extensions

Elixir Snippets

v0.1.0 · by FeedMyCat54 · added 3 November 2026

Write Elixir faster with code snippets.

Snippets

How to install

With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.

You can also open the Extensions panel in the app and search for Elixir Snippets. The extension's id is elixir-snippets.

Don't have Forge Super yet? Download it here.

README

From the extension's repository, written by its authors and not by Mentenaz. See the source.

Elixir Code Snippets

This repository contains a collection of Elixir code snippets designed to be used in the Zed editor. Inspired from the VSCode Elixir Snippets extension.

Migration Notes

Some of the original snippets have been modified either because they contain VSCode features not available in Zed or because they generate deprecated code :) If you have a way to improve/enhance a snippet, please open an issue or pr for it.

Installation

  1. In Zed go to the extensions page.
  2. Search for Elixir Snippets.
  3. Click Install.

Snippets Reference

PrefixDescription
casecase
condcond
defdef
dfdef (one line)
defddefdelegate
defedefexception
defidefimpl
dmac, defmacdefmacro
defmpdefmacrop
describedescribe
defpdefp
defprodefprotocol
defsdefstruct
dodo
docdoc
eeembed_eex
fnfn
forfor
forifor into
ifif
ifeif else
ifelif else (one line)
iflif (one line)
impimport
iinspect
iiIO.inspect
iibIO.inspect() binding() with module name & line number
iilIO.inspect(label: ...)
iillIO.inspect(label: "; Module:line_nr")
iipIO.inspect() piped value with module name & line number
istIO.inspect the current stacktrace
ipIO.puts(..)
vvvalue: value
kvkey => value
msmap/struct
mdocmoduledoc
mfsMap from Struct
mpPuts the given value under key in map
mpnPuts the given value under key unless the entry key already exists in map
msansanitize a map by dropping some keys
pyour favorite pipeline (|>)
peprint_eex
pryDebug with IEx.pry
recreceive
reqrequire
unlessunless
oke{:ok, ... } = ...
erre{:error, ... } = ...
ok{:ok, ... } ...
err{:error, ... } ...
testtest
testctest with context
trctry catch
trrtry rescue (everything!)
unlesseunless else
unlesselunless else (one line)
unlesslunless (one line)
supervisorInsert code for an OTP Supervisor
dynamic_supervisorInsert code for a DynamicSupervisor
gen_serverInsert code for a OTP GenServer
ex_unit, exuInsert code for a ExUnit
wtwith
wtewith/else

Contributing

Feel free to fork the project and submit pull requests to add new snippets or improve existing ones.