Pretty printing for Elixir
This pretty printer is inspired in the pp macro from Crystal: [https://crystal-lang.org/api/toplevel.html#pp%28%2Aexps%29-macro]. It's quite useful while doing print debugging.
Installation
The package can be installed by adding pp to your list of dependencies in mix.exs:
def deps do
[
{:pp, "~> 0.1.0"}
]
endUsage
In order to use the pp macro, first import the PP module in your code:
import PPNow you're ready to use the macro:
x = 1
y = 2
pp x + y, :redWhen that code is executed, it will print in the console in red color:
x + y # => 3Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/pp.