nix/modules/home-manager/iex.nix

36 lines
751 B
Nix
Raw Permalink Normal View History

2023-10-05 13:43:28 -05:00
{
home.file.".iex.exs" = {
enable = true;
text = ''
Application.put_env(:elixir, :ansi_enabled, true)
# PROTIP: to break, `#iex:break`
IEx.configure(
colors: [enabled: true],
inspect: [
pretty: true,
printable_limit: :infinity,
limit: :infinity,
charlists: :as_lists
2023-10-05 13:43:28 -05:00
],
default_prompt: [
# ANSI CHA, move cursor to column 1
# "\e[G",
:magenta,
# IEx prompt variable
"%prefix",
"#",
# IEx prompt variable
"%counter",
# plain string
">",
:reset
2023-10-05 13:43:28 -05:00
]
|> IO.ANSI.format()
|> IO.chardata_to_string()
)
2023-10-05 13:43:28 -05:00
'';
};
}