KristofferC / OhMyREPL.jl

Syntax highlighting and other enhancements for the Julia REPL
https://kristofferc.github.io/OhMyREPL.jl/latest/
Other
749 stars 56 forks source link

Markdown: Why is “julia> ” colored in red? #272

Open mgkurtz opened 1 year ago

mgkurtz commented 1 year ago

I really like the syntax highlighting of markdown code blocks. Only the red “julia> ” prompt really irritates me every time. Could the prompt rather be colored in green or like the currently configured prompt?

Currently :red is hard coded in https://github.com/KristofferC/OhMyREPL.jl/blob/aa1d7e258f788dfb261ad070fb39657e9c9ab98a/src/MarkdownHighlighter.jl#L46

Could we change that into

print(buff, Crayon(bold = true), INPUT_PROMPT_PREFIX, "julia> " , Crayon(reset = true))

or something alike?

Perhaps alternatively fetch the appropriate prefix from Base.active_repl.interface.modes[1].prompt_prefix and maybe also change "julia> " into the current prompt?

KristofferC commented 1 year ago

It was because of https://github.com/KristofferC/OhMyREPL.jl/issues/100

mgkurtz commented 1 year ago

Thanks for your swift reply. I created a small PR to allow configuration independently of the normal input prompt. I would be happy, if you could look at that @KristofferC.