Skip to content

Instantly share code, notes, and snippets.

@dillondaudert
Last active October 23, 2019 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dillondaudert/8e23728240c0a305a30f5ed424aa0f92 to your computer and use it in GitHub Desktop.
Save dillondaudert/8e23728240c0a305a30f5ed424aa0f92 to your computer and use it in GitHub Desktop.
Julia REPL startup: OhMyREPL.jl Solarized color theme
atreplinit() do repl
try
@eval using Crayons
@eval import OhMyREPL: Passes.SyntaxHighlighter
@eval function solarized_colorscheme()
# solarized crayons
base03 = crayon"#002b36"
base02 = crayon"#073642"
base01 = crayon"#586e75"
base00 = crayon"#657b83"
base0 = crayon"#839496"
base1 = crayon"#93a1a1"
base2 = crayon"#eee8d5"
base3 = crayon"#fdf6e3"
yellow = crayon"#b58900"
orange = crayon"#cb4b16"
red = crayon"#dc322f"
magenta = crayon"#d33682"
violet = crayon"#6c71c4"
blue = crayon"#268bd2"
cyan = crayon"#2aa198"
green = crayon"#859900"
scheme = SyntaxHighlighter.ColorScheme()
SyntaxHighlighter.text!(scheme, base1)
SyntaxHighlighter.number!(scheme, magenta)
SyntaxHighlighter.macro!(scheme, yellow)
SyntaxHighlighter.symbol!(scheme, orange)
SyntaxHighlighter.comment!(scheme, base0)
SyntaxHighlighter.string!(scheme, cyan)
SyntaxHighlighter.call!(scheme, blue)
SyntaxHighlighter.op!(scheme, green)
SyntaxHighlighter.keyword!(scheme, red)
SyntaxHighlighter.function_def!(scheme, blue)
SyntaxHighlighter.argdef!(scheme, base00)
SyntaxHighlighter.add!("SolarizedDark", scheme)
end
@eval solarized_colorscheme()
@eval using OhMyREPL
@eval colorscheme!("SolarizedDark")
catch e
@warn "error while import OhMyREPL" e
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment