Last active
November 26, 2017 03:45
-
-
Save mutablestate/a3b67c1520c12bb3d093749dba22ab26 to your computer and use it in GitHub Desktop.
IEx configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| imestamp = fn -> | |
| {_date, {hour, minute, _second}} = :calendar.local_time() | |
| [hour, minute] | |
| |> Enum.map( | |
| &String.pad_leading(Integer.to_string(&1), 2, "0") | |
| ) | |
| |> Enum.join(":") | |
| end | |
| counter = | |
| "(#{IO.ANSI.light_green()}%counter#{IO.ANSI.reset()})" | |
| node = "[#{IO.ANSI.yellow()}%node#{IO.ANSI.reset()}]" | |
| prompt = | |
| "#{IO.ANSI.light_black()}#{timestamp.()}#{IO.ANSI.reset()}" | |
| prefix = | |
| " #{IO.ANSI.light_green()}%prefix#{IO.ANSI.reset()}" | |
| IEx.configure( | |
| colors: [ | |
| syntax_colors: [ | |
| number: :light_yellow, | |
| atom: :light_cyan, | |
| string: :light_black, | |
| boolean: :red, | |
| nil: [:magenta, :bright] | |
| ], | |
| ls_directory: :cyan, | |
| ls_device: :yellow, | |
| doc_code: :green, | |
| doc_inline_code: :magenta, | |
| doc_title: [:reverse, :yellow] | |
| ], | |
| default_prompt: prompt <> prefix <> counter <> ">", | |
| alive_prompt: prompt <> prefix <> node <> counter <> ">", | |
| history_size: 50, | |
| inspect: [ | |
| pretty: true, | |
| limit: :infinity, | |
| width: 80 | |
| ], | |
| width: 80 | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment