nix/modules/home-manager/iex.nix
2023-10-05 13:43:28 -05:00

36 lines
731 B
Nix

{
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
],
default_prompt:
[
# ANSI CHA, move cursor to column 1
"\e[G",
:magenta,
# IEx prompt variable
"%prefix",
"#",
# IEx prompt variable
"%counter",
# plain string
">",
:reset
]
|> IO.ANSI.format()
|> IO.chardata_to_string()
)
'';
};
}