-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.iex_main.exs
55 lines (49 loc) · 1.45 KB
/
.iex_main.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
50
51
52
53
54
55
# This is a configuration file for IEx, the Elixir REPL.
# We can load this main file into other project-specific .iex.exs
# with the following snippet:
# if File.exists?(Path.expand("~/.iex_main.exs")), do: import_file("~/.iex_main.exs")
blue_ansi = IO.ANSI.blue()
reset_ansi = IO.ANSI.reset()
welcome_message = blue_ansi <> "(ノ◕ヮ◕)ノ*:・゚✧ Loading personal configuration..." <> reset_ansi
IO.puts(String.pad_leading(welcome_message, 50))
IEx.configure(
colors: [
syntax_colors: [
number: :magenta,
atom: :cyan,
string: :green,
boolean: :magenta,
nil: :red
],
eval_result: [:green, :bright],
eval_error: [[:red, :bright, "✘ \n"]],
eval_info: [:yellow, :bright],
eval_warning: [:yellow, :bright, "⚠"]],
# Prompt configuration
default_prompt:
[
# ANSI CHA, move cursor to column 1
"\e[G",
:light_magenta,
# counter which helps us to reuse the previous results using v(counter)
"%prefix",
:blue,
"(%counter)",
:yellow,
">",
:reset
]
|> IO.ANSI.format()
|> IO.chardata_to_string(),
# IO.inspect configuration
inspect: [
limit: :infinity,
charlists: :as_lists,
pretty: true,
binaries: :as_strings,
printable_limit: :infinity
]
)
# General imports and aliases
import ExUnit.Assertions
import_if_available(Ecto.Query)