-
Notifications
You must be signed in to change notification settings - Fork 0
/
iex.exs
49 lines (42 loc) · 1002 Bytes
/
iex.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
if :mix not in Enum.map(Application.loaded_applications(), &elem(&1, 0)) do
Mix.install([
:decimal,
:req
# {:req, path: "~/code/req"},
])
end
defmodule MyInspect do
# def inspect(%URI{} = url, _opts) do
# "#URI[" <> URI.to_string(url) <> "]"
# end
def inspect(%Date.Range{step: 1} = daterange, _opts) do
"~Date.Range[#{daterange.first}/#{daterange.last}]"
end
def inspect(%Date.Range{} = daterange, _opts) do
"~Date.Range[#{daterange.first}/#{daterange.last}//#{daterange.step}]"
end
def inspect(term, opts) do
Inspect.inspect(term, opts)
end
end
Inspect.Opts.default_inspect_fun(&MyInspect.inspect/2)
IEx.configure(
colors: [
syntax_colors: [
number: :light_yellow,
atom: :light_cyan,
string: :yellow,
boolean: :red,
nil: [:magenta, :bright]
],
eval_result: [:cyan, :bright]
],
history_size: 50,
inspect: [
pretty: true,
limit: :infinity,
width: 80
],
width: 80
)
# import Sigils