mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-12-18 22:21:32 +08:00
Optimise inspect coloring (#69)
This commit is contained in:
parent
0b6e8f7ef2
commit
199602016c
1 changed files with 8 additions and 4 deletions
|
|
@ -17,17 +17,21 @@ defmodule Livebook.Evaluator.StringFormatter do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp syntax_colors() do
|
defp syntax_colors() do
|
||||||
|
# Note: we intentionally don't specify colors
|
||||||
|
# for `:binary`, `:list`, `:map` and `:tuple`
|
||||||
|
# and rely on these using the default text color.
|
||||||
|
# This way we avoid a bunch of HTML tags for coloring commas, etc.
|
||||||
[
|
[
|
||||||
atom: :blue,
|
atom: :blue,
|
||||||
binary: :light_black,
|
# binary: :light_black,
|
||||||
boolean: :magenta,
|
boolean: :magenta,
|
||||||
list: :light_black,
|
# list: :light_black,
|
||||||
map: :light_black,
|
# map: :light_black,
|
||||||
number: :blue,
|
number: :blue,
|
||||||
nil: :magenta,
|
nil: :magenta,
|
||||||
regex: :red,
|
regex: :red,
|
||||||
string: :green,
|
string: :green,
|
||||||
tuple: :light_black,
|
# tuple: :light_black,
|
||||||
reset: :reset
|
reset: :reset
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue