JuliaEditorSupport / atom-language-julia

A Julia language support package for the Atom editor
Other
52 stars 39 forks source link

Highlight prompts in REPL syntax highlighting #283

Open adrhill opened 5 months ago

adrhill commented 5 months ago

The julia-console.cson grammar is now in use for syntax highlighting of Julia-REPL code blocks on GitHub:

julia> foo(x) = 2*x
foo (generic function with 1 method)

julia> foo(2)
4

julia> rand(3, 3)
3×3 Matrix{Float64}:
 0.0584225  0.130169  0.71839
 0.374485   0.915134  0.546367
 0.757699   0.195205  0.549311

julia> d = Dict(1 => 'a', 2 => 'b')
Dict{Int64, Char} with 2 entries:
  2 => 'b'
  1 => 'a'

(jl_jQnjZ8) pkg> st
Status `/private/var/folders/lx/07x6z_b908gd4wd3v_wf2b4c0000gn/T/jl_jQnjZ8/Project.toml` (empty project)

It would be nice to highlight REPL prompts similar to the way they are highlighted in the REPL, e.g. julia> in green, pkg> in blue, help?> in yellow and shell> in red.